fix(接口测试): 修复测试计划统计卡片中的数据归类公式,增加通过&未完成和通过&已完成的统计归类
This commit is contained in:
parent
cdcfab8e8f
commit
871b6c738c
|
@ -34,30 +34,36 @@ public class TestPlanCoverageDTO {
|
|||
private int errorCode;
|
||||
|
||||
public void archivedAutoIncrement() {
|
||||
archived++;
|
||||
this.archived++;
|
||||
}
|
||||
|
||||
public void notStartedAutoIncrement() {
|
||||
prepared++;
|
||||
unExecute++;
|
||||
notPassed++;
|
||||
this.prepared++;
|
||||
this.unExecute++;
|
||||
this.notPassed++;
|
||||
}
|
||||
|
||||
public void successAutoIncrement() {
|
||||
executed++;
|
||||
passed++;
|
||||
finished++;
|
||||
public void passAndFinishedAutoIncrement() {
|
||||
this.executed++;
|
||||
this.passed++;
|
||||
this.finished++;
|
||||
}
|
||||
|
||||
public void passAndNotFinishedAutoIncrement() {
|
||||
this.executed++;
|
||||
this.passed++;
|
||||
this.running++;
|
||||
}
|
||||
|
||||
public void unSuccessAutoIncrement() {
|
||||
executed++;
|
||||
notPassed++;
|
||||
finished++;
|
||||
this.executed++;
|
||||
this.notPassed++;
|
||||
this.finished++;
|
||||
}
|
||||
|
||||
public void testPlanRunningAutoIncrement() {
|
||||
executed++;
|
||||
notPassed++;
|
||||
running++;
|
||||
this.executed++;
|
||||
this.notPassed++;
|
||||
this.running++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -913,6 +913,8 @@
|
|||
CASE
|
||||
WHEN resource.last_exec_result is null
|
||||
THEN 'PENDING'
|
||||
WHEN resource.last_exec_result = ''
|
||||
THEN 'PENDING'
|
||||
WHEN resource.last_exec_result = '-'
|
||||
THEN 'PENDING'
|
||||
ELSE resource.last_exec_result
|
||||
|
|
|
@ -685,6 +685,8 @@
|
|||
THEN 'PENDING'
|
||||
WHEN resource.last_exec_result = '-'
|
||||
THEN 'PENDING'
|
||||
WHEN resource.last_exec_result = ''
|
||||
THEN 'PENDING'
|
||||
ELSE resource.last_exec_result
|
||||
END AS execResult
|
||||
from test_plan_api_scenario resource
|
||||
|
|
|
@ -812,6 +812,8 @@
|
|||
THEN 'PENDING'
|
||||
WHEN resource.last_exec_result = '-'
|
||||
THEN 'PENDING'
|
||||
WHEN resource.last_exec_result = ''
|
||||
THEN 'PENDING'
|
||||
ELSE resource.last_exec_result
|
||||
END AS execResult
|
||||
from test_plan_functional_case resource
|
||||
|
|
|
@ -1055,7 +1055,7 @@ public class TestPlanService extends TestPlanBaseUtilsService {
|
|||
//目前只有三个状态。如果同时包含多种状态(进行中/未开始、进行中/已完成、已完成/未开始、进行中/未开始/已完成),根据算法可得测试计划都会是进行中
|
||||
if (calculateList.size() == 1) {
|
||||
if (calculateList.contains(ResultStatus.SUCCESS.name())) {
|
||||
returnDTO.successAutoIncrement();
|
||||
returnDTO.passAndFinishedAutoIncrement();
|
||||
} else if (calculateList.contains(ExecStatus.PENDING.name())) {
|
||||
returnDTO.notStartedAutoIncrement();
|
||||
} else {
|
||||
|
@ -1063,7 +1063,13 @@ public class TestPlanService extends TestPlanBaseUtilsService {
|
|||
}
|
||||
} else {
|
||||
if (passphrase > executeRage) {
|
||||
returnDTO.successAutoIncrement();
|
||||
if (calculateList.contains(ExecStatus.PENDING.name())) {
|
||||
// 通过却未完成
|
||||
returnDTO.passAndNotFinishedAutoIncrement();
|
||||
} else {
|
||||
// 通过且完成
|
||||
returnDTO.passAndFinishedAutoIncrement();
|
||||
}
|
||||
} else if (calculateList.contains(ExecStatus.PENDING.name())) {
|
||||
// 存在还未完成的用例,测试计划为进行中
|
||||
returnDTO.testPlanRunningAutoIncrement();
|
||||
|
|
Loading…
Reference in New Issue