style(接口测试): 修复接口测试首页跳转之后数据不对的问题
--bug=1015403 --user=宋天阳 【接口测试】首页-场景用例数量统计,已通过场景数量和点击跳转后显示的数量不一样 https://www.tapd.cn/55049933/s/1212601
This commit is contained in:
parent
8dd7f39292
commit
b25e05ffab
|
@ -242,6 +242,8 @@ public class APITestController {
|
||||||
for (ExecuteResultCountDTO execResult : apiCaseExecResultList) {
|
for (ExecuteResultCountDTO execResult : apiCaseExecResultList) {
|
||||||
if (StringUtils.isEmpty(execResult.getExecResult())) {
|
if (StringUtils.isEmpty(execResult.getExecResult())) {
|
||||||
unexecuteCount += execResult.getCount();
|
unexecuteCount += execResult.getCount();
|
||||||
|
} else if (StringUtils.equalsAnyIgnoreCase(execResult.getExecResult(), "Underway", ExecuteResult.TEST_PLAN_PREPARE.toString())) {
|
||||||
|
unexecuteCount += execResult.getCount();
|
||||||
} else if (StringUtils.equalsIgnoreCase(execResult.getExecResult(), ExecuteResult.API_SUCCESS.toString())) {
|
} else if (StringUtils.equalsIgnoreCase(execResult.getExecResult(), ExecuteResult.API_SUCCESS.toString())) {
|
||||||
executionPassCount += execResult.getCount();
|
executionPassCount += execResult.getCount();
|
||||||
} else if (StringUtils.equalsAnyIgnoreCase(execResult.getExecResult(), ExecuteResult.ERROR_REPORT_RESULT.toString(), ExecuteResult.ERROR_REPORT.toString())) {
|
} else if (StringUtils.equalsAnyIgnoreCase(execResult.getExecResult(), ExecuteResult.ERROR_REPORT_RESULT.toString(), ExecuteResult.ERROR_REPORT.toString())) {
|
||||||
|
|
|
@ -184,7 +184,7 @@ public class ApiDataCountDTO {
|
||||||
|
|
||||||
public void countRunResult(List<ApiDataCountResult> countResultByRunResult) {
|
public void countRunResult(List<ApiDataCountResult> countResultByRunResult) {
|
||||||
for (ApiDataCountResult countResult : countResultByRunResult) {
|
for (ApiDataCountResult countResult : countResultByRunResult) {
|
||||||
if ("notRun".equals(countResult.getGroupField())) {
|
if (StringUtils.equalsAnyIgnoreCase(countResult.getGroupField(), "notRun", "unexecute")) {
|
||||||
this.unexecuteCount += countResult.getCountNumber();
|
this.unexecuteCount += countResult.getCountNumber();
|
||||||
} else if ("Fail".equals(countResult.getGroupField())) {
|
} else if ("Fail".equals(countResult.getGroupField())) {
|
||||||
this.executionFailedCount += countResult.getCountNumber();
|
this.executionFailedCount += countResult.getCountNumber();
|
||||||
|
|
|
@ -277,7 +277,7 @@
|
||||||
and (api_scenario.status is null or api_scenario.status != 'Trash')
|
and (api_scenario.status is null or api_scenario.status != 'Trash')
|
||||||
</if>
|
</if>
|
||||||
<if test="request.executeStatus == 'unExecute' and request.selectDataType != 'schedule' ">
|
<if test="request.executeStatus == 'unExecute' and request.selectDataType != 'schedule' ">
|
||||||
and api_scenario.last_result IS NULL
|
and (api_scenario.last_result IS NULL or api_scenario.last_result = 'unexecute')
|
||||||
</if>
|
</if>
|
||||||
<if test="request.executeStatus == 'executeFailed' and request.selectDataType != 'schedule' ">
|
<if test="request.executeStatus == 'executeFailed' and request.selectDataType != 'schedule' ">
|
||||||
and api_scenario.last_result = 'Fail'
|
and api_scenario.last_result = 'Fail'
|
||||||
|
|
|
@ -429,7 +429,7 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="request.redirectFilter == 'unexecuteCount' ">
|
<if test="request.redirectFilter == 'unexecuteCount' ">
|
||||||
and (t1.status IS NULL or t1.status = '')
|
and (t1.status IS NULL or t1.status = '' or t1.status = 'Prepare' or t1.status = 'Underway')
|
||||||
</if>
|
</if>
|
||||||
<if test="request.redirectFilter == 'executionPassCount' ">
|
<if test="request.redirectFilter == 'executionPassCount' ">
|
||||||
and t1.status = 'success'
|
and t1.status = 'success'
|
||||||
|
|
Loading…
Reference in New Issue