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