fix(误报库): 修复场景调试报告展示页面没有误报tab的问题
--bug=1009861 --user=宋天阳 【接口测试】场景执行结果,没有显示误报tab https://www.tapd.cn/55049933/s/1096145
This commit is contained in:
parent
702c2f3cb3
commit
15a3227135
|
@ -147,10 +147,10 @@ public class ApiScenarioReportStructureService {
|
||||||
*/
|
*/
|
||||||
for (StepTreeDTO step : dtoList) {
|
for (StepTreeDTO step : dtoList) {
|
||||||
if (step.getValue() != null) {
|
if (step.getValue() != null) {
|
||||||
if (step.getValue().getError() > 0 || !step.getValue().isSuccess()) {
|
if (StringUtils.isNotEmpty(step.getErrorCode())) {
|
||||||
isError.set(isError.longValue() + 1);
|
|
||||||
} else if (StringUtils.isNotEmpty(step.getErrorCode())) {
|
|
||||||
isErrorReport.set(isErrorReport.longValue() + 1);
|
isErrorReport.set(isErrorReport.longValue() + 1);
|
||||||
|
}else if (step.getValue().getError() > 0 || !step.getValue().isSuccess()) {
|
||||||
|
isError.set(isError.longValue() + 1);
|
||||||
}
|
}
|
||||||
} else if (CollectionUtils.isNotEmpty(step.getChildren())) {
|
} else if (CollectionUtils.isNotEmpty(step.getChildren())) {
|
||||||
AtomicLong isChildrenError = new AtomicLong();
|
AtomicLong isChildrenError = new AtomicLong();
|
||||||
|
@ -175,8 +175,7 @@ public class ApiScenarioReportStructureService {
|
||||||
scenarioCalculate(step.getChildren(), error, errorReportCode);
|
scenarioCalculate(step.getChildren(), error, errorReportCode);
|
||||||
if (error.longValue() > 0) {
|
if (error.longValue() > 0) {
|
||||||
scenarioError.set((scenarioError.longValue() + 1));
|
scenarioError.set((scenarioError.longValue() + 1));
|
||||||
}
|
} else if (errorReportCode.longValue() > 0) {
|
||||||
if (errorReportCode.longValue() > 0) {
|
|
||||||
errorReport.set((errorReport.longValue() + 1));
|
errorReport.set((errorReport.longValue() + 1));
|
||||||
}
|
}
|
||||||
} else if (step.getValue() != null) {
|
} else if (step.getValue() != null) {
|
||||||
|
|
|
@ -40,6 +40,13 @@
|
||||||
ref="failsTree"
|
ref="failsTree"
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane name="errorReport" v-if="content.errorCode > 0">
|
||||||
|
<template slot="label">
|
||||||
|
<span class="fail">{{ $t('error_report_library.option.name') }}</span>
|
||||||
|
</template>
|
||||||
|
<ms-scenario-results v-on:requestResult="requestResult" :console="content.console"
|
||||||
|
:treeData="fullTreeNodes" ref="errorReportTree"/>
|
||||||
|
</el-tab-pane>
|
||||||
<el-tab-pane name="console">
|
<el-tab-pane name="console">
|
||||||
<template slot="label">
|
<template slot="label">
|
||||||
<span class="console">{{ $t('api_test.definition.request.console') }}</span>
|
<span class="console">{{ $t('api_test.definition.request.console') }}</span>
|
||||||
|
@ -192,6 +199,8 @@ export default {
|
||||||
filter(index) {
|
filter(index) {
|
||||||
if (index === "1") {
|
if (index === "1") {
|
||||||
this.$refs.failsTree.filter(index);
|
this.$refs.failsTree.filter(index);
|
||||||
|
} else if (this.activeName === "errorReport") {
|
||||||
|
this.$refs.errorReportTree.filter("errorReport");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleClick(tab, event) {
|
handleClick(tab, event) {
|
||||||
|
|
Loading…
Reference in New Issue