fix: 修复测试计划执行性能测试时 trigger_mode 对应不上的问题

This commit is contained in:
CaptainB 2021-11-24 09:57:12 +08:00 committed by 刘瑞斌
parent 07b2276667
commit 8a0b3da88a
6 changed files with 14 additions and 3 deletions

View File

@ -1138,11 +1138,11 @@ public class TestPlanService {
performanceRequest.setTestResourcePoolId(runModeConfig.getResourcePoolId()); performanceRequest.setTestResourcePoolId(runModeConfig.getResourcePoolId());
} }
if (StringUtils.equals(ReportTriggerMode.API.name(), triggerMode)) { if (StringUtils.equals(ReportTriggerMode.API.name(), triggerMode)) {
performanceRequest.setTriggerMode(ReportTriggerMode.API.name()); performanceRequest.setTriggerMode(ReportTriggerMode.TEST_PLAN_API.name());
} else if (StringUtils.equals(ReportTriggerMode.MANUAL.name(), triggerMode)) { } else if (StringUtils.equals(ReportTriggerMode.MANUAL.name(), triggerMode)) {
performanceRequest.setTriggerMode(ReportTriggerMode.MANUAL.name()); performanceRequest.setTriggerMode(ReportTriggerMode.MANUAL.name());
} else { } else {
performanceRequest.setTriggerMode(ReportTriggerMode.SCHEDULE.name()); performanceRequest.setTriggerMode(ReportTriggerMode.TEST_PLAN_SCHEDULE.name());
} }
String reportId = null; String reportId = null;
try { try {

View File

@ -2,7 +2,8 @@
<span> <span>
<span v-if="triggerMode === 'MANUAL'">{{$t('commons.trigger_mode.manual')}}</span> <span v-if="triggerMode === 'MANUAL'">{{$t('commons.trigger_mode.manual')}}</span>
<span v-if="triggerMode === 'SCHEDULE'">{{$t('commons.trigger_mode.schedule')}}</span> <span v-if="triggerMode === 'SCHEDULE'">{{$t('commons.trigger_mode.schedule')}}</span>
<span v-if="triggerMode === 'TEST_PLAN_SCHEDULE'">{{$t('commons.trigger_mode.schedule')}}</span> <span v-if="triggerMode === 'TEST_PLAN_SCHEDULE'">{{$t('commons.trigger_mode.test_plan_schedule')}}</span>
<span v-if="triggerMode === 'TEST_PLAN_API'">{{$t('commons.trigger_mode.test_plan_api')}}</span>
<span v-if="triggerMode === 'API'">{{$t('commons.trigger_mode.api')}}</span> <span v-if="triggerMode === 'API'">{{$t('commons.trigger_mode.api')}}</span>
<span v-if="triggerMode === 'BATCH'">{{$t('api_test.automation.batch_execute')}}</span> <span v-if="triggerMode === 'BATCH'">{{$t('api_test.automation.batch_execute')}}</span>
</span> </span>

View File

@ -184,7 +184,11 @@ export default {
triggerFilters: [ triggerFilters: [
{text: this.$t('commons.trigger_mode.manual'), value: 'MANUAL'}, {text: this.$t('commons.trigger_mode.manual'), value: 'MANUAL'},
{text: this.$t('commons.trigger_mode.schedule'), value: 'SCHEDULE'}, {text: this.$t('commons.trigger_mode.schedule'), value: 'SCHEDULE'},
{text: this.$t('commons.trigger_mode.test_plan_schedule'), value: 'TEST_PLAN_SCHEDULE'},
{text: this.$t('commons.trigger_mode.test_plan_api'), value: 'TEST_PLAN_API'},
{text: this.$t('commons.trigger_mode.api'), value: 'API'}, {text: this.$t('commons.trigger_mode.api'), value: 'API'},
{text: this.$t('commons.trigger_mode.case'), value: 'CASE'},
{text: this.$t('api_test.automation.batch_execute'), value: 'BATCH'},
], ],
buttons: [ buttons: [
{ {

View File

@ -238,6 +238,8 @@ export default {
name: "Trigger Mode", name: "Trigger Mode",
manual: "Manual trigger", manual: "Manual trigger",
schedule: "Scheduled Task", schedule: "Scheduled Task",
test_plan_schedule: "TestPlan Scheduled Task",
test_plan_api: "TestPlan API call",
api: "API call", api: "API call",
case: "Case" case: "Case"
}, },

View File

@ -239,6 +239,8 @@ export default {
name: "触发方式", name: "触发方式",
manual: "手动触发", manual: "手动触发",
schedule: "定时任务", schedule: "定时任务",
test_plan_schedule: "计划定时任务",
test_plan_api: "计划API调用",
api: "API调用", api: "API调用",
case: "用例触发" case: "用例触发"
}, },

View File

@ -239,6 +239,8 @@ export default {
name: "觸發方式", name: "觸發方式",
manual: "手動觸發", manual: "手動觸發",
schedule: "定時任務", schedule: "定時任務",
test_plan_schedule: "計劃定時任務",
test_plan_api: "計劃API調用",
api: "API調用", api: "API調用",
case: "用例觸發" case: "用例觸發"
}, },