fix(Jenkins执行): 增加Jenkins执行接口的运行模式参数匹配
增加Jenkins执行接口的运行模式参数匹配
This commit is contained in:
parent
c0dd00c0f3
commit
9bde158b7e
|
@ -73,7 +73,7 @@ public class ApiJmeterFileService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
HashTree hashTree;
|
HashTree hashTree;
|
||||||
if (StringUtils.equalsAnyIgnoreCase(runMode, ApiRunMode.DEFINITION.name(), ApiRunMode.API_PLAN.name(), ApiRunMode.SCHEDULE_API_PLAN.name(), ApiRunMode.MANUAL_PLAN.name())) {
|
if (StringUtils.equalsAnyIgnoreCase(runMode, ApiRunMode.DEFINITION.name(), ApiRunMode.JENKINS_API_PLAN.name(),ApiRunMode.API_PLAN.name(), ApiRunMode.SCHEDULE_API_PLAN.name(), ApiRunMode.MANUAL_PLAN.name())) {
|
||||||
String testId = remoteTestId;
|
String testId = remoteTestId;
|
||||||
if (remoteTestId.contains(":")) {
|
if (remoteTestId.contains(":")) {
|
||||||
//执行测试计划案例时会有拼接ID,ID为 planTestCaseId:测试计划报告ID
|
//执行测试计划案例时会有拼接ID,ID为 planTestCaseId:测试计划报告ID
|
||||||
|
|
|
@ -391,7 +391,13 @@ public class TestPlanApiCaseService {
|
||||||
if (caseWithBLOBs != null) {
|
if (caseWithBLOBs != null) {
|
||||||
apiResult.setName(caseWithBLOBs.getName());
|
apiResult.setName(caseWithBLOBs.getName());
|
||||||
}
|
}
|
||||||
apiResult.setTriggerMode(TriggerMode.BATCH.name());
|
if(StringUtils.equalsIgnoreCase(request.getTriggerMode(),ApiRunMode.SCHEDULE_API_PLAN.name())) {
|
||||||
|
apiResult.setTriggerMode(TriggerMode.SCHEDULE.name());
|
||||||
|
}else if(StringUtils.equalsIgnoreCase(request.getTriggerMode(),ApiRunMode.JENKINS_API_PLAN.name())){
|
||||||
|
apiResult.setTriggerMode(TriggerMode.MANUAL.name());
|
||||||
|
}else {
|
||||||
|
apiResult.setTriggerMode(TriggerMode.BATCH.name());
|
||||||
|
}
|
||||||
apiResult.setActuator("LOCAL");
|
apiResult.setActuator("LOCAL");
|
||||||
if (request.getConfig() != null && StringUtils.isNotEmpty(request.getConfig().getResourcePoolId())) {
|
if (request.getConfig() != null && StringUtils.isNotEmpty(request.getConfig().getResourcePoolId())) {
|
||||||
apiResult.setActuator(request.getConfig().getResourcePoolId());
|
apiResult.setActuator(request.getConfig().getResourcePoolId());
|
||||||
|
|
Loading…
Reference in New Issue