fix(接口测试): 修复接口测试统计问题
--bug=1016909 --user=宋天阳 【接口测试】首页场景用例数量统计未执行数量不正确 https://www.tapd.cn/55049933/s/1245805
This commit is contained in:
parent
b027ba880d
commit
07aa7a94cd
|
@ -2,7 +2,7 @@ name: 问题咨询
|
||||||
description: 提出针对本项目安装部署、使用及其他方面的相关问题
|
description: 提出针对本项目安装部署、使用及其他方面的相关问题
|
||||||
title: "[QUESTION]"
|
title: "[QUESTION]"
|
||||||
labels: question
|
labels: question
|
||||||
assignees: Hyyfit
|
assignees: luty2018
|
||||||
body:
|
body:
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: description
|
id: description
|
||||||
|
|
|
@ -249,7 +249,7 @@ public class APITestController {
|
||||||
apiCountResult.setExecutionPassCount(executionPassCount);
|
apiCountResult.setExecutionPassCount(executionPassCount);
|
||||||
apiCountResult.setFakeErrorCount(fakeErrorCount);
|
apiCountResult.setFakeErrorCount(fakeErrorCount);
|
||||||
|
|
||||||
if (unexecuteCount + executedCountNumber + executionPassCount > 0) {
|
if (unexecuteCount + executionFailedCount + executionPassCount + fakeErrorCount > 0) {
|
||||||
//通过率
|
//通过率
|
||||||
float coverageRageNumber = (float) executionPassCount * 100 / (unexecuteCount + executedCountNumber + executionPassCount);
|
float coverageRageNumber = (float) executionPassCount * 100 / (unexecuteCount + executedCountNumber + executionPassCount);
|
||||||
DecimalFormat df = new DecimalFormat("0.0");
|
DecimalFormat df = new DecimalFormat("0.0");
|
||||||
|
|
|
@ -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 (StringUtils.equalsAnyIgnoreCase(countResult.getGroupField(), "notRun", "unexecute")) {
|
if (StringUtils.equalsAnyIgnoreCase(countResult.getGroupField(), "notRun", "unexecute") || StringUtils.isEmpty(countResult.getGroupField())) {
|
||||||
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();
|
||||||
|
|
Loading…
Reference in New Issue