diff --git a/backend/src/main/resources/db/migration/V50__api_scenario.sql b/backend/src/main/resources/db/migration/V50__api_scenario.sql index cdee3a499f..b682f0c220 100644 --- a/backend/src/main/resources/db/migration/V50__api_scenario.sql +++ b/backend/src/main/resources/db/migration/V50__api_scenario.sql @@ -16,7 +16,7 @@ CREATE TABLE `api_scenario` ( `follow_people` varchar(100) DEFAULT NULL COMMENT 'api scenario Follow people ', `schedule` varchar(255) DEFAULT NULL COMMENT 'Test schedule (cron list)', `scenario_definition` longtext COMMENT 'Test scenario_definition json', - `description` varchar(255) DEFAULT NULL COMMENT 'api scenario description', + `description` longtext DEFAULT NULL COMMENT 'api scenario description', `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', `pass_rate` varchar(100) DEFAULT NULL, @@ -43,12 +43,13 @@ CREATE TABLE `api_scenario_report` ( `id` varchar(50) NOT NULL COMMENT 'Test report ID', `project_id` varchar(50) NOT NULL COMMENT 'scenario ID this test report belongs to', `name` varchar(64) NOT NULL COMMENT 'Test report name', - `description` varchar(255) DEFAULT NULL COMMENT 'Test report name', + `description` longtext DEFAULT NULL COMMENT 'Test report name', `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', `status` varchar(64) NOT NULL COMMENT 'Status of this test run', `user_id` varchar(64) DEFAULT NULL, `trigger_mode` varchar(64) DEFAULT NULL, + `execute_type` varchar(200) NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; diff --git a/backend/src/main/resources/db/migration/V46__api_definition.sql b/backend/src/main/resources/db/migration/V51__api_definition.sql similarity index 95% rename from backend/src/main/resources/db/migration/V46__api_definition.sql rename to backend/src/main/resources/db/migration/V51__api_definition.sql index 188e584390..223818b694 100644 --- a/backend/src/main/resources/db/migration/V46__api_definition.sql +++ b/backend/src/main/resources/db/migration/V51__api_definition.sql @@ -21,7 +21,7 @@ CREATE TABLE IF NOT EXISTS `api_definition` ( `protocol` varchar(255) NOT NULL COMMENT 'request protocol', `path` varchar(1000) DEFAULT NULL COMMENT 'request path', `module_path` varchar(1000) COMMENT 'module path', - `description` varchar(255) DEFAULT NULL COMMENT 'Test description', + `description` longtext DEFAULT NULL COMMENT 'Test description', `environment_id` varchar(50) DEFAULT NULL COMMENT 'environment id', `request` longtext COMMENT 'request (JSON format)', `response` longtext COMMENT 'request (JSON format)', @@ -40,7 +40,7 @@ CREATE TABLE IF NOT EXISTS `api_test_case` ( `name` varchar(64) NOT NULL COMMENT 'Test name', `priority` varchar(64) NOT NULL COMMENT 'priority', `api_definition_id` varchar(50) NOT NULL COMMENT 'api definition id', - `description` varchar(255) DEFAULT NULL COMMENT 'Test description', + `description` longtext DEFAULT NULL COMMENT 'Test description', `request` longtext COMMENT 'request (JSON format)', `response` longtext COMMENT 'response (JSON format)', `create_user_id` varchar(64) DEFAULT NULL COMMENT 'User ID', @@ -59,6 +59,7 @@ CREATE TABLE IF NOT EXISTS `api_definition_exec_result` ( `user_id` varchar(64) DEFAULT NULL COMMENT 'User ID', `start_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `end_time` bigint(13) NOT NULL COMMENT 'Update timestamp', + `create_time` bigint(13) NULL COMMENT 'Create time', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; diff --git a/backend/src/main/resources/db/migration/V51__modify_api_definition_exec_result.sql b/backend/src/main/resources/db/migration/V51__modify_api_definition_exec_result.sql deleted file mode 100644 index 9d3d443338..0000000000 --- a/backend/src/main/resources/db/migration/V51__modify_api_definition_exec_result.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE api_definition_exec_result ADD create_time BIGINT(13) NULL; diff --git a/backend/src/main/resources/db/migration/V53__modify_api_scenario.sql b/backend/src/main/resources/db/migration/V53__modify_api_scenario.sql deleted file mode 100644 index d783a7bea8..0000000000 --- a/backend/src/main/resources/db/migration/V53__modify_api_scenario.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE api_scenario_report ADD execute_type varchar(200) NULL; -ALTER TABLE api_definition MODIFY COLUMN description LONGTEXT NULL COMMENT 'Test description'; -ALTER TABLE api_test_case MODIFY COLUMN description LONGTEXT NULL COMMENT 'Test case description'; -ALTER TABLE api_scenario MODIFY COLUMN description LONGTEXT NULL COMMENT 'Api scenario description'; -ALTER TABLE api_scenario_report MODIFY COLUMN description LONGTEXT NULL COMMENT 'Api scenario report description'; \ No newline at end of file diff --git a/frontend/src/business/components/api/automation/report/components/RequestResult.vue b/frontend/src/business/components/api/automation/report/components/RequestResult.vue index 28efc6cbea..3af4ceb7aa 100644 --- a/frontend/src/business/components/api/automation/report/components/RequestResult.vue +++ b/frontend/src/business/components/api/automation/report/components/RequestResult.vue @@ -73,7 +73,6 @@ methods: { active() { this.isActive = !this.isActive; - console.log(this.request) //this.$emit("requestResult", {request: this.request, scenarioName: this.scenarioName}); } }, diff --git a/frontend/src/business/components/api/automation/report/components/RequestSubResult.vue b/frontend/src/business/components/api/automation/report/components/RequestSubResult.vue index b65bc1afd4..53e26c0c27 100644 --- a/frontend/src/business/components/api/automation/report/components/RequestSubResult.vue +++ b/frontend/src/business/components/api/automation/report/components/RequestSubResult.vue @@ -59,7 +59,6 @@ methods: { active() { this.isActive = !this.isActive; - console.log(this.request) //this.$emit("requestResult", {request: this.request, scenarioName: this.scenarioName}); } }, diff --git a/frontend/src/business/components/api/automation/scenario/ApiComponent.vue b/frontend/src/business/components/api/automation/scenario/ApiComponent.vue index 928eafd66a..3e1dd54499 100644 --- a/frontend/src/business/components/api/automation/scenario/ApiComponent.vue +++ b/frontend/src/business/components/api/automation/scenario/ApiComponent.vue @@ -2,18 +2,18 @@
-
+
{{request.index}}
{{request.index}}
- + {{$t('api_test.automation.api_list_import')}} - + {{$t('api_test.automation.customize_req')}} @@ -21,6 +21,7 @@ {{$t('api_test.automation.reference_deleted')}} + {{ $t('commons.copy') }} {{ $t('api_test.scenario.reference') }}
{{$t('api_test.automation.scenario_import')}} {{scenario.name}} {{$t('api_test.automation.reference_deleted')}} + {{ $t('commons.copy') }} {{ $t('api_test.scenario.reference') }}
diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index 4853dc3d5a..5df9e6e1f0 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -134,10 +134,10 @@ :{{this.currentScenario.variables!=undefined?this.currentScenario.variables.length-1: 0}} - {{ '共享cookie' }} + 共享cookie - {{$t('api_test.definition.request.run_env')}}: + {{$t('api_test.definition.request.run_env')}}: @@ -826,12 +826,13 @@ margin-right: 10px; color: white; } - .ms-font{ + + .ms-font { color: #303133; font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", Arial, sans-serif; font-size: 13px; - } + .ms-col-one { margin-top: 6px; } @@ -921,6 +922,17 @@ font-weight: normal; } + /deep/ .el-checkbox { + color: #303133; + font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", Arial, sans-serif; + font-size: 13px; + font-weight: normal; + } + + /deep/ .el-checkbox__label { + padding-left: 5px; + } + .head { border-bottom: 1px solid #303133; color: #303133; diff --git a/frontend/src/business/components/api/definition/components/body/ApiBody.vue b/frontend/src/business/components/api/definition/components/body/ApiBody.vue index 2e42b00377..1e84c6a0c8 100644 --- a/frontend/src/business/components/api/definition/components/body/ApiBody.vue +++ b/frontend/src/business/components/api/definition/components/body/ApiBody.vue @@ -1,5 +1,5 @@ diff --git a/frontend/src/business/components/api/definition/components/request/http/ApiHttpRequestForm.vue b/frontend/src/business/components/api/definition/components/request/http/ApiHttpRequestForm.vue index 26b1040fc2..47301e9c71 100644 --- a/frontend/src/business/components/api/definition/components/request/http/ApiHttpRequestForm.vue +++ b/frontend/src/business/components/api/definition/components/request/http/ApiHttpRequestForm.vue @@ -48,7 +48,7 @@ - + diff --git a/frontend/src/business/components/api/definition/components/response/ResponseResult.vue b/frontend/src/business/components/api/definition/components/response/ResponseResult.vue index a7f9a7305f..8be2966cc5 100644 --- a/frontend/src/business/components/api/definition/components/response/ResponseResult.vue +++ b/frontend/src/business/components/api/definition/components/response/ResponseResult.vue @@ -10,7 +10,7 @@ - + @@ -26,17 +26,21 @@ -
- {{$t('api_test.request.address')}} : {{ response.url }} +
+ {{$t('api_test.request.address')}} : +
{{ response.url }}
-
- {{$t('api_test.scenario.headers')}} : {{ response.headers }} +
+ {{$t('api_test.scenario.headers')}} : +
{{ response.headers }}
-
- Cookies : {{response.cookies}} +
+ Cookies : +
{{response.cookies}}
-
- Body : {{response.body}} +
+ Body : +
{{response.body}}
@@ -45,7 +49,6 @@ @@ -139,6 +142,10 @@ height: 0px; } + .ms-div { + margin-top: 20px; + } + pre { margin: 0; } diff --git a/frontend/src/business/components/api/definition/components/response/SqlResultTable.vue b/frontend/src/business/components/api/definition/components/response/SqlResultTable.vue index 5406710eef..baf93f46c4 100644 --- a/frontend/src/business/components/api/definition/components/response/SqlResultTable.vue +++ b/frontend/src/business/components/api/definition/components/response/SqlResultTable.vue @@ -24,79 +24,83 @@