fix(接口测试): 修复接口测试统计问题

--bug=1016909 --user=宋天阳 【接口测试】首页场景用例数量统计未执行数量不正确
https://www.tapd.cn/55049933/s/1245805
This commit is contained in:
LuoTing 2022-09-19 18:28:39 +08:00 committed by 建国
parent b027ba880d
commit 07aa7a94cd
3 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@ name: 问题咨询
description: 提出针对本项目安装部署、使用及其他方面的相关问题
title: "[QUESTION]"
labels: question
assignees: Hyyfit
assignees: luty2018
body:
- type: textarea
id: description

View File

@ -249,7 +249,7 @@ public class APITestController {
apiCountResult.setExecutionPassCount(executionPassCount);
apiCountResult.setFakeErrorCount(fakeErrorCount);
if (unexecuteCount + executedCountNumber + executionPassCount > 0) {
if (unexecuteCount + executionFailedCount + executionPassCount + fakeErrorCount > 0) {
//通过率
float coverageRageNumber = (float) executionPassCount * 100 / (unexecuteCount + executedCountNumber + executionPassCount);
DecimalFormat df = new DecimalFormat("0.0");

View File

@ -184,7 +184,7 @@ public class ApiDataCountDTO {
public void countRunResult(List<ApiDataCountResult> countResultByRunResult) {
for (ApiDataCountResult countResult : countResultByRunResult) {
if (StringUtils.equalsAnyIgnoreCase(countResult.getGroupField(), "notRun", "unexecute")) {
if (StringUtils.equalsAnyIgnoreCase(countResult.getGroupField(), "notRun", "unexecute") || StringUtils.isEmpty(countResult.getGroupField())) {
this.unexecuteCount += countResult.getCountNumber();
} else if ("Fail".equals(countResult.getGroupField())) {
this.executionFailedCount += countResult.getCountNumber();