From 785705e69e1d261bf9e410cb25f2a15fe5e93c89 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Mon, 6 Jul 2020 11:53:36 +0800 Subject: [PATCH 1/8] =?UTF-8?q?api=E6=B5=8B=E8=AF=95=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metersphere/api/dto/scenario/Request.java | 2 + .../api/dto/scenario/Scenario.java | 1 + .../components/api/test/ApiTestConfig.vue | 2 +- .../test/components/ApiEnvironmentConfig.vue | 5 +- .../api/test/components/ApiRequestConfig.vue | 22 ++-- .../api/test/components/ApiRequestForm.vue | 123 ++++++++++++------ .../api/test/components/ApiScenarioConfig.vue | 7 +- .../api/test/components/ApiScenarioForm.vue | 76 ++++++++++- .../collapse/ApiRequestMethodSelect.vue | 28 ++++ .../business/components/api/test/model/JMX.js | 12 +- .../api/test/model/ScenarioModel.js | 50 ++++++- 11 files changed, 264 insertions(+), 64 deletions(-) create mode 100644 frontend/src/business/components/api/test/components/collapse/ApiRequestMethodSelect.vue diff --git a/backend/src/main/java/io/metersphere/api/dto/scenario/Request.java b/backend/src/main/java/io/metersphere/api/dto/scenario/Request.java index ce55174015..ccd1e0ec95 100644 --- a/backend/src/main/java/io/metersphere/api/dto/scenario/Request.java +++ b/backend/src/main/java/io/metersphere/api/dto/scenario/Request.java @@ -11,6 +11,8 @@ public class Request { private String name; private String url; private String method; + private Boolean useEnvironment; + private String path; private List parameters; private List headers; private Body body; diff --git a/backend/src/main/java/io/metersphere/api/dto/scenario/Scenario.java b/backend/src/main/java/io/metersphere/api/dto/scenario/Scenario.java index df60feb3b6..960702d351 100644 --- a/backend/src/main/java/io/metersphere/api/dto/scenario/Scenario.java +++ b/backend/src/main/java/io/metersphere/api/dto/scenario/Scenario.java @@ -8,6 +8,7 @@ import java.util.List; public class Scenario { private String name; private String url; + private String environmentId; private List variables; private List headers; private List requests; diff --git a/frontend/src/business/components/api/test/ApiTestConfig.vue b/frontend/src/business/components/api/test/ApiTestConfig.vue index 997d32852e..a2e4eef886 100644 --- a/frontend/src/business/components/api/test/ApiTestConfig.vue +++ b/frontend/src/business/components/api/test/ApiTestConfig.vue @@ -50,7 +50,7 @@ - + diff --git a/frontend/src/business/components/api/test/components/ApiEnvironmentConfig.vue b/frontend/src/business/components/api/test/components/ApiEnvironmentConfig.vue index fb042867e1..369539926f 100644 --- a/frontend/src/business/components/api/test/components/ApiEnvironmentConfig.vue +++ b/frontend/src/business/components/api/test/components/ApiEnvironmentConfig.vue @@ -1,5 +1,5 @@