fix(测试计划): 优化测试计划执行的入参
This commit is contained in:
parent
02deeaf7c4
commit
12cda645a4
|
@ -1,7 +1,6 @@
|
|||
package io.metersphere.plan.dto.request;
|
||||
|
||||
import io.metersphere.sdk.constants.ApiBatchRunMode;
|
||||
import io.metersphere.sdk.constants.ApiExecuteRunMode;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
|
@ -23,7 +22,4 @@ public class TestPlanBatchExecuteRequest {
|
|||
@Schema(description = "执行模式", allowableValues = {"SERIAL", "PARALLEL"}, requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String runMode = ApiBatchRunMode.SERIAL.name();
|
||||
|
||||
@Schema(description = "执行来源", allowableValues = {"JENKINS", "SCENARIO", "RUN"}, requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String executionSource = ApiExecuteRunMode.RUN.name();
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package io.metersphere.plan.dto.request;
|
||||
|
||||
import io.metersphere.sdk.constants.ApiBatchRunMode;
|
||||
import io.metersphere.sdk.constants.ApiExecuteRunMode;
|
||||
import io.metersphere.sdk.constants.TaskTriggerMode;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
@ -16,7 +16,7 @@ public class TestPlanExecuteRequest {
|
|||
@Schema(description = "执行模式", allowableValues = {"SERIAL", "PARALLEL"}, requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String runMode = ApiBatchRunMode.SERIAL.name();
|
||||
|
||||
@Schema(description = "执行来源", allowableValues = {"JENKINS", "SCENARIO", "RUN"}, requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String executionSource = ApiExecuteRunMode.RUN.name();
|
||||
@Schema(description = "执行来源", allowableValues = {"MANUAL", "RUN", "SCHEDULE"}, requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String executionSource = TaskTriggerMode.MANUAL.name();
|
||||
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import io.metersphere.plan.mapper.*;
|
|||
import io.metersphere.sdk.constants.ApiBatchRunMode;
|
||||
import io.metersphere.sdk.constants.CaseType;
|
||||
import io.metersphere.sdk.constants.ExecStatus;
|
||||
import io.metersphere.sdk.constants.TaskTriggerMode;
|
||||
import io.metersphere.sdk.constants.TestPlanConstants;
|
||||
import io.metersphere.sdk.dto.queue.TestPlanExecutionQueue;
|
||||
import io.metersphere.sdk.exception.MSException;
|
||||
|
@ -187,7 +188,7 @@ public class TestPlanExecuteService {
|
|||
null,
|
||||
testPlanId,
|
||||
runMode,
|
||||
request.getExecutionSource(),
|
||||
TaskTriggerMode.BATCH.name(),
|
||||
IDGenerator.nextStr()
|
||||
)
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue