diff --git a/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportStructureService.java b/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportStructureService.java
index ea51280cdd..5117e8eb85 100644
--- a/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportStructureService.java
+++ b/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportStructureService.java
@@ -147,10 +147,10 @@ public class ApiScenarioReportStructureService {
*/
for (StepTreeDTO step : dtoList) {
if (step.getValue() != null) {
- if (step.getValue().getError() > 0 || !step.getValue().isSuccess()) {
- isError.set(isError.longValue() + 1);
- } else if (StringUtils.isNotEmpty(step.getErrorCode())) {
+ if (StringUtils.isNotEmpty(step.getErrorCode())) {
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())) {
AtomicLong isChildrenError = new AtomicLong();
@@ -175,8 +175,7 @@ public class ApiScenarioReportStructureService {
scenarioCalculate(step.getChildren(), error, errorReportCode);
if (error.longValue() > 0) {
scenarioError.set((scenarioError.longValue() + 1));
- }
- if (errorReportCode.longValue() > 0) {
+ } else if (errorReportCode.longValue() > 0) {
errorReport.set((errorReport.longValue() + 1));
}
} else if (step.getValue() != null) {
diff --git a/frontend/src/business/components/api/automation/report/SysnApiReportDetail.vue b/frontend/src/business/components/api/automation/report/SysnApiReportDetail.vue
index 391a2eeb7f..09fb6e3bcb 100644
--- a/frontend/src/business/components/api/automation/report/SysnApiReportDetail.vue
+++ b/frontend/src/business/components/api/automation/report/SysnApiReportDetail.vue
@@ -40,6 +40,13 @@
ref="failsTree"
/>
+
+
+ {{ $t('error_report_library.option.name') }}
+
+
+
{{ $t('api_test.definition.request.console') }}
@@ -192,6 +199,8 @@ export default {
filter(index) {
if (index === "1") {
this.$refs.failsTree.filter(index);
+ } else if (this.activeName === "errorReport") {
+ this.$refs.errorReportTree.filter("errorReport");
}
},
handleClick(tab, event) {