fix:【测试用例】复制用例,点击保存,不关闭页面,修改用例名
This commit is contained in:
parent
c04418a377
commit
c7ec8065f4
|
@ -152,14 +152,15 @@ public class TestPlanController {
|
||||||
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
||||||
return PageUtils.setPageInfo(page, testPlanProjectService.getProjectByPlanId(request));
|
return PageUtils.setPageInfo(page, testPlanProjectService.getProjectByPlanId(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/testplan/jenkins")
|
@PostMapping("/testplan/jenkins")
|
||||||
public void runJenkins(@RequestBody TestplanRunRequest testplanRunRequest) {
|
public String runJenkins(@RequestBody TestplanRunRequest testplanRunRequest) {
|
||||||
ApiRunConfigDTO api = new ApiRunConfigDTO();
|
ApiRunConfigDTO api = new ApiRunConfigDTO();
|
||||||
api.setMode(testplanRunRequest.getMode());
|
api.setMode(testplanRunRequest.getMode());
|
||||||
api.setResourcePoolId(testplanRunRequest.getResourcePoolId());
|
api.setResourcePoolId(testplanRunRequest.getResourcePoolId());
|
||||||
api.setOnSampleError(true);
|
api.setOnSampleError(true);
|
||||||
api.setReportType("iddReport");
|
api.setReportType("iddReport");
|
||||||
String apiRunConfig = JSONObject.toJSONString(api);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1054,6 +1054,7 @@ public class TestCaseService {
|
||||||
|
|
||||||
public String edit(EditTestCaseRequest request, List<MultipartFile> files) {
|
public String edit(EditTestCaseRequest request, List<MultipartFile> files) {
|
||||||
TestCaseWithBLOBs testCaseWithBLOBs = testCaseMapper.selectByPrimaryKey(request.getId());
|
TestCaseWithBLOBs testCaseWithBLOBs = testCaseMapper.selectByPrimaryKey(request.getId());
|
||||||
|
request.setNum(testCaseWithBLOBs.getNum());
|
||||||
if (testCaseWithBLOBs == null) {
|
if (testCaseWithBLOBs == null) {
|
||||||
MSException.throwException(Translator.get("edit_load_test_not_found") + request.getId());
|
MSException.throwException(Translator.get("edit_load_test_not_found") + request.getId());
|
||||||
}
|
}
|
||||||
|
|
|
@ -1000,7 +1000,7 @@ public class TestPlanService {
|
||||||
return returnId;
|
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<String, String> planScenarioIdMap;
|
Map<String, String> planScenarioIdMap;
|
||||||
Map<String, String> apiTestCaseIdMap;
|
Map<String, String> apiTestCaseIdMap;
|
||||||
Map<String, String> performanceIdMap;
|
Map<String, String> performanceIdMap;
|
||||||
|
@ -1160,6 +1160,7 @@ public class TestPlanService {
|
||||||
testPlanReport.setIsPerformanceExecuting(performaceIsExcuting);
|
testPlanReport.setIsPerformanceExecuting(performaceIsExcuting);
|
||||||
testPlanReportService.update(testPlanReport);
|
testPlanReportService.update(testPlanReport);
|
||||||
}
|
}
|
||||||
|
return testPlanReport.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLogDetails(String id) {
|
public String getLogDetails(String id) {
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
:key="index"/>
|
:key="index"/>
|
||||||
<el-table-column v-if="item.id == 'name'" prop="name" sortable="custom" min-width="120"
|
<el-table-column v-if="item.id == 'name'" prop="name" sortable="custom" min-width="120"
|
||||||
:label="$t('api_test.definition.api_name')" show-overflow-tooltip :key="index"/>
|
:label="$t('test_track.case.name')" show-overflow-tooltip :key="index"/>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="item.id == 'priority'"
|
v-if="item.id == 'priority'"
|
||||||
|
|
Loading…
Reference in New Issue