diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanScenarioCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanScenarioCaseMapper.xml index d880c58ad8..db964fec41 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanScenarioCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanScenarioCaseMapper.xml @@ -239,7 +239,7 @@ select - t.id, t.last_result, t.report_id, c.user_id, c.module_path, c.name, c.level, + t.id, t.last_result, t.report_id, c.user_id, c.module_path, c.name, c.level,c.create_user,c.principal, c.status,c.step_total, c.step_total, c.project_id, c.num, c.custom_num from diff --git a/frontend/src/business/components/api/definition/components/runtest/RunTestHTTPPage.vue b/frontend/src/business/components/api/definition/components/runtest/RunTestHTTPPage.vue index 51ed91ede0..febd783823 100644 --- a/frontend/src/business/components/api/definition/components/runtest/RunTestHTTPPage.vue +++ b/frontend/src/business/components/api/definition/components/runtest/RunTestHTTPPage.vue @@ -56,6 +56,7 @@

{{ $t('api_test.definition.request.req_param') }}

@@ -111,6 +112,7 @@ export default { api: {}, loaded: false, loading: false, + loadRequest: true, createCase: "", currentRequest: {}, refreshSign: "", @@ -146,13 +148,31 @@ export default { if (param.headers) { this.api.request.headers = param.headers; } - if (param.arguments!==null && param.arguments.length > 0) { + if (param.arguments !== null && param.arguments.length > 0) { + for (let i = 0; i < param.arguments.length; i++) { + if (!param.arguments[i].required) { + param.arguments[i].required = true; + } + } this.api.request.arguments = param.arguments; } if (param.body) { + if (param.body.kvs) { + for (let i = 0; i < param.body.kvs.length; i++) { + if (!param.body.kvs[i].required) { + param.body.kvs[i].required = true; + } + } + } + this.api.request.body = param.body; } if (param.rest) { + for (let i = 0; i < param.rest.length; i++) { + if (!param.rest[i].required) { + param.rest[i].required = true; + } + } this.api.request.rest = param.rest; } } @@ -167,6 +187,10 @@ export default { }); }) } + this.loadRequest = false; + this.$nextTick(() => { + this.loadRequest = true; + }) }, handleCommand(e) { switch (e) {