diff --git a/test-track/backend/src/main/java/io/metersphere/dto/LoadTestExportJmx.java b/test-track/backend/src/main/java/io/metersphere/dto/LoadTestExportJmx.java index 735486f7f6..1d73b53664 100644 --- a/test-track/backend/src/main/java/io/metersphere/dto/LoadTestExportJmx.java +++ b/test-track/backend/src/main/java/io/metersphere/dto/LoadTestExportJmx.java @@ -9,8 +9,11 @@ public class LoadTestExportJmx { private String name; private String jmx; + public LoadTestExportJmx() { + } + public LoadTestExportJmx(String name, String jmx) { this.name = name; this.jmx = jmx; } -} +} \ No newline at end of file diff --git a/test-track/backend/src/main/java/io/metersphere/dto/MetricData.java b/test-track/backend/src/main/java/io/metersphere/dto/MetricData.java new file mode 100644 index 0000000000..c2eb25b935 --- /dev/null +++ b/test-track/backend/src/main/java/io/metersphere/dto/MetricData.java @@ -0,0 +1,16 @@ +package io.metersphere.dto; + +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +@Getter +@Setter +public class MetricData { + private String uniqueLabel; + private String seriesName; + private List values; + private List timestamps; + private String instance; +} diff --git a/test-track/backend/src/main/java/io/metersphere/dto/Monitor.java b/test-track/backend/src/main/java/io/metersphere/dto/Monitor.java new file mode 100644 index 0000000000..04838ee0e4 --- /dev/null +++ b/test-track/backend/src/main/java/io/metersphere/dto/Monitor.java @@ -0,0 +1,16 @@ +package io.metersphere.dto; + +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +@Getter +@Setter +public class Monitor { + private String name; + private String ip; + private String port; + private String description; + private List monitorConfig; +} diff --git a/test-track/backend/src/main/java/io/metersphere/dto/MonitorItem.java b/test-track/backend/src/main/java/io/metersphere/dto/MonitorItem.java new file mode 100644 index 0000000000..70fcbede89 --- /dev/null +++ b/test-track/backend/src/main/java/io/metersphere/dto/MonitorItem.java @@ -0,0 +1,11 @@ +package io.metersphere.dto; + +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class MonitorItem { + private String value; // 表达式 + private String name; // 监控项 +} diff --git a/test-track/backend/src/main/java/io/metersphere/dto/TestPlanLoadCaseDTO.java b/test-track/backend/src/main/java/io/metersphere/dto/TestPlanLoadCaseDTO.java index 25daefc3d2..b7761720de 100644 --- a/test-track/backend/src/main/java/io/metersphere/dto/TestPlanLoadCaseDTO.java +++ b/test-track/backend/src/main/java/io/metersphere/dto/TestPlanLoadCaseDTO.java @@ -6,11 +6,9 @@ import io.metersphere.plan.dto.ChartsData; import io.metersphere.plan.dto.Errors; import io.metersphere.plan.dto.ErrorsTop5; import io.metersphere.plan.dto.Statistics; -import io.opentelemetry.sdk.metrics.data.MetricData; import lombok.Getter; import lombok.Setter; -import javax.management.monitor.Monitor; import java.util.List; import java.util.Map; diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java index e9d034ef9d..d69ec37eb2 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java @@ -1423,8 +1423,10 @@ public class TestPlanService { if (serviceIdSet.contains(MicroServiceName.API_TEST)) { report.setApiAllCases(planTestPlanApiCaseService.buildResponse(report.getApiAllCases())); report.setApiFailureCases(planTestPlanApiCaseService.buildResponse(report.getApiFailureCases())); + report.setErrorReportCases(planTestPlanApiCaseService.buildResponse(report.getErrorReportCases())); report.setScenarioAllCases(planTestPlanScenarioCaseService.buildResponse(report.getScenarioAllCases())); report.setScenarioFailureCases(planTestPlanScenarioCaseService.buildResponse(report.getScenarioFailureCases())); + report.setErrorReportScenarios(planTestPlanScenarioCaseService.buildResponse(report.getErrorReportScenarios())); } if (serviceIdSet.contains(MicroServiceName.UI_TEST)) { @@ -1455,7 +1457,8 @@ public class TestPlanService { String line = null; while (null != (line = bufferedReader.readLine())) { if (line.contains("\"#report\"")) { - line = line.replace("\"#report\"", new Gson().toJson(report)); + String reportInfo = new Gson().toJson(report); + line = line.replace("\"#report\"", reportInfo); } line += StringUtils.LF; byte[] lineBytes = line.getBytes(StandardCharsets.UTF_8); diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/remote/performance/PlanTestPlanLoadCaseService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/remote/performance/PlanTestPlanLoadCaseService.java index e7de1cb9f6..b8e5f85854 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/remote/performance/PlanTestPlanLoadCaseService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/remote/performance/PlanTestPlanLoadCaseService.java @@ -138,7 +138,8 @@ public class PlanTestPlanLoadCaseService extends LoadTestService { if (CollectionUtils.isEmpty(loadCases)) { return null; } - return microService.postForDataArray(serviceName, BASE_UEL + "/build/response", loadCases, TestPlanLoadCaseDTO.class); + List returnList = microService.postForDataArray(serviceName, BASE_UEL + "/build/response", loadCases, TestPlanLoadCaseDTO.class); + return returnList; } public Object relevanceList(int pageNum, int pageSize, LoadCaseRequest request) { diff --git a/test-track/backend/src/main/java/io/metersphere/plan/utils/TestCaseSyncStatusUtil.java b/test-track/backend/src/main/java/io/metersphere/plan/utils/TestCaseSyncStatusUtil.java index 26a111db43..bc173598ef 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/utils/TestCaseSyncStatusUtil.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/utils/TestCaseSyncStatusUtil.java @@ -3,7 +3,6 @@ package io.metersphere.plan.utils; import io.metersphere.base.domain.TestCaseTest; import io.metersphere.commons.constants.TestPlanStatus; import io.metersphere.dto.*; -import io.metersphere.i18n.Translator; import io.metersphere.plan.constant.ApiReportStatus; import io.metersphere.plan.dto.CaseExecResult; import io.metersphere.plan.enums.FunctionCaseExecResult; @@ -259,6 +258,6 @@ public class TestCaseSyncStatusUtil { } public static String generateCommentDesc(String testPlanName, String caseName, String status) { - return String.format(Translator.get("test_case_sync_status_comment"), caseName, testPlanName, status); + return String.format("关联的case %s 在测试计划【%s】内的执行结果出现%s。", caseName, testPlanName, status); } } diff --git a/test-track/backend/src/main/resources/i18n/messages_en_US.properties b/test-track/backend/src/main/resources/i18n/messages_en_US.properties index 6a669e496a..b73aaa62ba 100644 --- a/test-track/backend/src/main/resources/i18n/messages_en_US.properties +++ b/test-track/backend/src/main/resources/i18n/messages_en_US.properties @@ -228,6 +228,5 @@ test_plan_delete_exec_error=The test plan is being executed test_case_review_status_underway=Underway test_case_review_status_re_review=ReReview api_status_fake_error=Fake error -test_case_sync_status_comment=Relevance case %s in test plan [%s] has be executed by result %s。 serial=Serial parallel=Parallel \ No newline at end of file diff --git a/test-track/backend/src/main/resources/i18n/messages_zh_CN.properties b/test-track/backend/src/main/resources/i18n/messages_zh_CN.properties index 79cb0efe7f..97708b030b 100644 --- a/test-track/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/test-track/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -199,6 +199,5 @@ test_plan_delete_exec_error=测试计划正在执行中 test_case_review_status_underway=评审中 test_case_review_status_re_review=重新提审 api_status_fake_error=误报 -test_case_sync_status_comment=关联的case %s 在测试计划【%s】内的执行结果出现%s。 serial=串行 parallel=并行 diff --git a/test-track/backend/src/main/resources/i18n/messages_zh_TW.properties b/test-track/backend/src/main/resources/i18n/messages_zh_TW.properties index c230000f5b..770dc19216 100644 --- a/test-track/backend/src/main/resources/i18n/messages_zh_TW.properties +++ b/test-track/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -199,6 +199,5 @@ test_plan_delete_exec_error=測試計劃正在執行中 test_case_review_status_underway=評審中 test_case_review_status_re_review=重新提審 api_status_fake_error=誤報 -test_case_sync_status_comment=關聯的case %s 在測試計劃【%s】內的執行結果出現%s。 serial=串行 parallel=並行