fix(测试计划): 接口测试用例触发方式#1006035
This commit is contained in:
parent
42bc283104
commit
a883cd4f37
|
@ -206,6 +206,8 @@ public class ApiDefinitionExecResultService {
|
|||
}
|
||||
if (StringUtils.equals(type, ApiRunMode.JENKINS_API_PLAN.name())) {
|
||||
saveResult.setTriggerMode(TriggerMode.API.name());
|
||||
} else if (StringUtils.equals(type, ApiRunMode.MANUAL_PLAN.name())) {
|
||||
saveResult.setTriggerMode(TriggerMode.MANUAL.name());
|
||||
} else {
|
||||
saveResult.setTriggerMode(TriggerMode.SCHEDULE.name());
|
||||
}
|
||||
|
|
|
@ -89,9 +89,9 @@ public class TestResultService {
|
|||
reportTask.setExecutionTime(DateUtils.getTimeString(apiTestCaseWithBLOBs.getCreateTime()));
|
||||
reportTask.setExecutionEnvironment(name);
|
||||
//测试计划用例,定时,jenkins
|
||||
} else if (StringUtils.equalsAny(runMode, ApiRunMode.API_PLAN.name(), ApiRunMode.SCHEDULE_API_PLAN.name(), ApiRunMode.JENKINS_API_PLAN.name())) {
|
||||
} else if (StringUtils.equalsAny(runMode, ApiRunMode.API_PLAN.name(), ApiRunMode.SCHEDULE_API_PLAN.name(), ApiRunMode.JENKINS_API_PLAN.name(), ApiRunMode.MANUAL_PLAN.name())) {
|
||||
//测试计划定时任务-接口执行逻辑的话,需要同步测试计划的报告数据
|
||||
if (StringUtils.equalsAny(runMode, ApiRunMode.SCHEDULE_API_PLAN.name(), ApiRunMode.JENKINS_API_PLAN.name())) {
|
||||
if (StringUtils.equalsAny(runMode, ApiRunMode.SCHEDULE_API_PLAN.name(), ApiRunMode.JENKINS_API_PLAN.name(), ApiRunMode.MANUAL_PLAN.name())) {
|
||||
apiDefinitionExecResultService.saveApiResultByScheduleTask(testResult, debugReportId, runMode);
|
||||
} else {
|
||||
apiDefinitionExecResultService.saveApiResult(testResult, ApiRunMode.API_PLAN.name(), TriggerMode.MANUAL.name());
|
||||
|
|
|
@ -2,5 +2,5 @@ package io.metersphere.commons.constants;
|
|||
|
||||
public enum ApiRunMode {
|
||||
RUN, DEBUG, DEFINITION, SCENARIO, API_PLAN, JENKINS_API_PLAN, JENKINS_SCENARIO_PLAN, JENKINS_PERFORMANCE_TEST, JENKINS,
|
||||
SCENARIO_PLAN, API, SCHEDULE_API_PLAN, SCHEDULE_SCENARIO, SCHEDULE_SCENARIO_PLAN, SCHEDULE_PERFORMANCE_TEST
|
||||
SCENARIO_PLAN, API, SCHEDULE_API_PLAN, SCHEDULE_SCENARIO, SCHEDULE_SCENARIO_PLAN, SCHEDULE_PERFORMANCE_TEST, MANUAL_PLAN
|
||||
}
|
||||
|
|
|
@ -1090,6 +1090,8 @@ public class TestPlanService {
|
|||
try {
|
||||
if (StringUtils.equals(triggerMode, ReportTriggerMode.API.name())) {
|
||||
apiTestCaseService.run(blobs, UUID.randomUUID().toString(), planReportId, testPlanId, ApiRunMode.JENKINS_API_PLAN.name());
|
||||
} else if (StringUtils.equals(triggerMode, ReportTriggerMode.MANUAL.name())) {
|
||||
apiTestCaseService.run(blobs, UUID.randomUUID().toString(), planReportId, testPlanId, ApiRunMode.MANUAL_PLAN.name());
|
||||
} else {
|
||||
apiTestCaseService.run(blobs, UUID.randomUUID().toString(), planReportId, testPlanId, ApiRunMode.SCHEDULE_API_PLAN.name());
|
||||
}
|
||||
|
@ -1115,7 +1117,9 @@ public class TestPlanService {
|
|||
if (StringUtils.equals(triggerMode, ReportTriggerMode.API.name())) {
|
||||
scenarioRequest.setTriggerMode(ReportTriggerMode.API.name());
|
||||
scenarioRequest.setRunMode(ApiRunMode.JENKINS_SCENARIO_PLAN.name());
|
||||
|
||||
} else if (StringUtils.equals(triggerMode, ReportTriggerMode.MANUAL.name())) {
|
||||
scenarioRequest.setTriggerMode(ReportTriggerMode.MANUAL.name());
|
||||
scenarioRequest.setRunMode(ApiRunMode.JENKINS_SCENARIO_PLAN.name());
|
||||
} else {
|
||||
scenarioRequest.setTriggerMode(ReportTriggerMode.SCHEDULE.name());
|
||||
scenarioRequest.setRunMode(ApiRunMode.SCHEDULE_SCENARIO_PLAN.name());
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
:fields-width="fieldsWidth"
|
||||
prop="envs"
|
||||
:label="$t('commons.environment')"
|
||||
min-width="120">
|
||||
min-width="150">
|
||||
<template v-slot:default="{row}">
|
||||
<div v-if="row.envs">
|
||||
<span v-for="(k, v, index) in row.envs" :key="index">
|
||||
|
@ -555,7 +555,7 @@ export default {
|
|||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: 100px;
|
||||
width: 80px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue