fix(测试跟踪): 修复测试计划执行时环境选择的问题

--bug=1011603 --user=刘瑞斌 【测试跟踪】-测试计划执行 选择其他环境运行,首次并行 执行后,接口用例 显示的是之前的环境 https://www.tapd.cn/55049933/s/1124182
This commit is contained in:
CaptainB 2022-03-23 13:16:59 +08:00 committed by 刘瑞斌
parent 7e7b58df4e
commit 7ce28d2589

View File

@ -1895,16 +1895,15 @@ public class TestPlanService {
this.setPlanCaseEnv(testplanRunRequest.getTestPlanId(), runModeConfig);
}
ApiRunConfigDTO api = new ApiRunConfigDTO();
api.setMode(testplanRunRequest.getMode());
api.setResourcePoolId(testplanRunRequest.getResourcePoolId());
api.setOnSampleError(Boolean.parseBoolean(testplanRunRequest.getOnSampleError()));
runModeConfig.setMode(testplanRunRequest.getMode());
runModeConfig.setResourcePoolId(testplanRunRequest.getResourcePoolId());
runModeConfig.setOnSampleError(Boolean.parseBoolean(testplanRunRequest.getOnSampleError()));
if (StringUtils.isBlank(testplanRunRequest.getReportType())) {
api.setReportType("iddReport");
runModeConfig.setReportType("iddReport");
} else {
api.setReportType(testplanRunRequest.getReportType());
runModeConfig.setReportType(testplanRunRequest.getReportType());
}
String apiRunConfig = JSONObject.toJSONString(api);
String apiRunConfig = JSONObject.toJSONString(runModeConfig);
return this.run(testplanRunRequest.getTestPlanId(), testplanRunRequest.getProjectId(),
testplanRunRequest.getUserId(), testplanRunRequest.getTriggerMode(), apiRunConfig);
}