diff --git a/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java b/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java index f9bd32b13b..49165e9b55 100644 --- a/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java +++ b/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java @@ -152,14 +152,15 @@ public class TestPlanController { Page page = PageHelper.startPage(goPage, pageSize, true); return PageUtils.setPageInfo(page, testPlanProjectService.getProjectByPlanId(request)); } + @PostMapping("/testplan/jenkins") - public void runJenkins(@RequestBody TestplanRunRequest testplanRunRequest) { + public String runJenkins(@RequestBody TestplanRunRequest testplanRunRequest) { ApiRunConfigDTO api = new ApiRunConfigDTO(); api.setMode(testplanRunRequest.getMode()); api.setResourcePoolId(testplanRunRequest.getResourcePoolId()); api.setOnSampleError(true); api.setReportType("iddReport"); String apiRunConfig = JSONObject.toJSONString(api); - testPlanService.run(testplanRunRequest.getTestPlanId(), testplanRunRequest.getProjectId(), testplanRunRequest.getUserId(), testplanRunRequest.getTriggerMode(), apiRunConfig); + return testPlanService.run(testplanRunRequest.getTestPlanId(), testplanRunRequest.getProjectId(), testplanRunRequest.getUserId(), testplanRunRequest.getTriggerMode(), apiRunConfig); } } diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java index aac69c7f63..ec16fdbcd9 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java @@ -1054,6 +1054,7 @@ public class TestCaseService { public String edit(EditTestCaseRequest request, List files) { TestCaseWithBLOBs testCaseWithBLOBs = testCaseMapper.selectByPrimaryKey(request.getId()); + request.setNum(testCaseWithBLOBs.getNum()); if (testCaseWithBLOBs == null) { MSException.throwException(Translator.get("edit_load_test_not_found") + request.getId()); } diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java index 5924c92a59..4b8ff5827d 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java @@ -1000,7 +1000,7 @@ public class TestPlanService { return returnId; } - public void run(String testPlanID, String projectID, String userId, String triggerMode, String apiRunConfig) { + public String run(String testPlanID, String projectID, String userId, String triggerMode, String apiRunConfig) { Map planScenarioIdMap; Map apiTestCaseIdMap; Map performanceIdMap; @@ -1160,6 +1160,7 @@ public class TestPlanService { testPlanReport.setIsPerformanceExecuting(performaceIsExcuting); testPlanReportService.update(testPlanReport); } + return testPlanReport.getId(); } public String getLogDetails(String id) { diff --git a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiCaseList.vue b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiCaseList.vue index b50ac0941d..1c32a3405f 100644 --- a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiCaseList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiCaseList.vue @@ -37,7 +37,7 @@ show-overflow-tooltip :key="index"/> + :label="$t('test_track.case.name')" show-overflow-tooltip :key="index"/>