From a9396da1b6f8ba3ce5ab7b0360d20a395a75ae4e Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Mon, 25 Mar 2024 14:29:55 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E4=BC=98=E5=8C=96=E6=8A=A5=E5=91=8A=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ApiDefinitionModuleControllerTests.java | 2 +- .../controller/ApiReportSendNoticeTests.java | 2 +- .../ApiScenarioControllerTests.java | 3 ++- .../ApiTestCaseControllerTests.java | 1 + .../resources/dml/init_api_definition.sql | 24 +++++++++---------- .../dml/init_functional_case_test.sql | 4 ++-- .../dml/init_functional_scenario_test.sql | 4 ++-- .../SystemProjectControllerTests.java | 4 ++-- .../src/test/resources/dml/init_aspect.sql | 2 +- .../test/resources/dml/init_task_center.sql | 6 ++--- .../plan/service/TestPlanTestService.java | 2 ++ 11 files changed, 29 insertions(+), 25 deletions(-) diff --git a/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiDefinitionModuleControllerTests.java b/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiDefinitionModuleControllerTests.java index 42d96419be..49931049ac 100644 --- a/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiDefinitionModuleControllerTests.java +++ b/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiDefinitionModuleControllerTests.java @@ -174,7 +174,7 @@ public class ApiDefinitionModuleControllerTests extends BaseTest { apiTestCase.setUpdateUser("admin"); apiTestCase.setVersionId("1.0"); apiTestCase.setDeleted(false); - caseMapper.insert(apiTestCase); + caseMapper.insertSelective(apiTestCase); ApiTestCaseBlob apiTestCaseBlob = new ApiTestCaseBlob(); apiTestCaseBlob.setId(apiTestCase.getId()); apiTestCaseBlob.setRequest(JSON.toJSONBytes(msHttpElement)); diff --git a/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiReportSendNoticeTests.java b/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiReportSendNoticeTests.java index 971e5de8a7..de7638b8c4 100644 --- a/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiReportSendNoticeTests.java +++ b/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiReportSendNoticeTests.java @@ -72,7 +72,7 @@ public class ApiReportSendNoticeTests extends BaseTest { apiTestCase.setUpdateUser("admin"); apiTestCase.setVersionId("1.0"); apiTestCase.setDeleted(false); - apiTestCaseMapper.insert(apiTestCase); + apiTestCaseMapper.insertSelective(apiTestCase); List reports = new ArrayList<>(); List records = new ArrayList<>(); diff --git a/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiScenarioControllerTests.java b/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiScenarioControllerTests.java index 5a0d1f915b..6fa3819bef 100644 --- a/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiScenarioControllerTests.java +++ b/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiScenarioControllerTests.java @@ -806,7 +806,7 @@ public class ApiScenarioControllerTests extends BaseTest { @Order(7) public void testLoopController() throws Exception { // @@请求成功 - mockPost("/api/debug", ""); + mockPost("/api/scenario/debug", ""); baseResourcePoolTestService.initProjectResourcePool(); // @@请求成功 @@ -2580,6 +2580,7 @@ public class ApiScenarioControllerTests extends BaseTest { apiTestCase.setPos(i * 64L); apiTestCase.setApiDefinitionId("system-api-id"); apiTestCase.setVersionId("1.0"); + apiTestCase.setLastReportStatus("未执行"); apiTestCases.add(apiTestCase); } apiTestCaseMapper.batchInsert(apiTestCases); diff --git a/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiTestCaseControllerTests.java b/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiTestCaseControllerTests.java index 0c1f5e94ca..ba3e2a089a 100644 --- a/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiTestCaseControllerTests.java +++ b/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiTestCaseControllerTests.java @@ -221,6 +221,7 @@ public class ApiTestCaseControllerTests extends BaseTest { apiTestCase.setUpdateUser("admin"); apiTestCase.setVersionId("1.0"); apiTestCase.setDeleted(false); + apiTestCase.setLastReportStatus("SUCCESS"); caseMapper.insert(apiTestCase); ApiTestCaseBlob apiTestCaseBlob = new ApiTestCaseBlob(); apiTestCaseBlob.setId(apiTestCase.getId()); diff --git a/backend/services/api-test/src/test/resources/dml/init_api_definition.sql b/backend/services/api-test/src/test/resources/dml/init_api_definition.sql index 5e2b2ad772..a228c94388 100644 --- a/backend/services/api-test/src/test/resources/dml/init_api_definition.sql +++ b/backend/services/api-test/src/test/resources/dml/init_api_definition.sql @@ -12,15 +12,15 @@ DELETE FROM `project_version` WHERE `id` = '100570499574136985'; INSERT INTO project_version (id, project_id, name, description, status, latest, publish_time, start_time, end_time, create_time, create_user) VALUES ('100570499574136985', '100001100001', 'v1.0.0', NULL, 'open', 1, UNIX_TIMESTAMP() * 1000, UNIX_TIMESTAMP() * 1000, UNIX_TIMESTAMP() * 1000, UNIX_TIMESTAMP() * 1000, 'admin'); DELETE FROM `api_test_case` WHERE `id` in ('12df5721-c5e6-a38b-e999-3eafcb992094','12df5721-c5e6-a38b-e999-3eafcb992100','12df5721-c5e6-a38b-e999-3eafcb992233','3ee2ae9c-a680-4ed6-b115-1f6ab8980973','3ee2ae9c-a680-4ed6-b115-1f6ab8980100','3ee2ae9c-a680-4ed6-b115-1f6ab8980589','3ee2ae9c-a680-4ed6-b115-1f6ab8980553','3ee2ae9c-a680-4ed6-b115-1f6ab8980104','3ee2ae9c-a680-4ed6-b115-1f6ab8980545'); -INSERT INTO `api_test_case` (`id`, `name`, `priority`, `num`, `tags`, `status`, `last_report_status`, `last_report_id`, `pos`, `project_id`, `api_definition_id`, `version_id`, `environment_id`, `create_time`, `create_user`, `update_time`, `update_user`, `delete_time`, `delete_user`, `deleted`) VALUES ('12df5721-c5e6-a38b-e999-3eafcb992094', '查询windows主机1', 'P0', 100002001, NULL, 'PROCESSING', NULL, '10001', 10000, '100001100001', '1001', '100570499574136985', 'admin', 1699500298164, 'admin', 1699500298164, 'admin', NULL, NULL, b'0'); -INSERT INTO `api_test_case` (`id`, `name`, `priority`, `num`, `tags`, `status`, `last_report_status`, `last_report_id`, `pos`, `project_id`, `api_definition_id`, `version_id`, `environment_id`, `create_time`, `create_user`, `update_time`, `update_user`, `delete_time`, `delete_user`, `deleted`) VALUES ('12df5721-c5e6-a38b-e999-3eafcb992100', '查询windows主机2', 'P0', 100002002, NULL, 'PROCESSING', NULL, '10002', 10000, '100001100001', '1001', '100570499574136985', 'admin', 1699500298164, 'admin', 1699500298164, 'admin', NULL, NULL, b'0'); -INSERT INTO `api_test_case` (`id`, `name`, `priority`, `num`, `tags`, `status`, `last_report_status`, `last_report_id`, `pos`, `project_id`, `api_definition_id`, `version_id`, `environment_id`, `create_time`, `create_user`, `update_time`, `update_user`, `delete_time`, `delete_user`, `deleted`) VALUES ('12df5721-c5e6-a38b-e999-3eafcb992233', '查询windows主机3', 'P0', 100002003, NULL, 'PROCESSING', NULL, '10003', 10000, '100001100001', '1002', '100570499574136985', 'admin', 1699500298164, 'admin', 1699500298164, 'admin', NULL, NULL, b'0'); -INSERT INTO `api_test_case` (`id`, `name`, `priority`, `num`, `tags`, `status`, `last_report_status`, `last_report_id`, `pos`, `project_id`, `api_definition_id`, `version_id`, `environment_id`, `create_time`, `create_user`, `update_time`, `update_user`, `delete_time`, `delete_user`, `deleted`) VALUES ('3ee2ae9c-a680-4ed6-b115-1f6ab8980973', '查询Linux主机1', 'P0', 100002004, NULL, 'PROCESSING', NULL, '10004', 10000, '100001100001', '1002', '100570499574136985', 'admin', 1699500298164, 'admin', 1699500298164, 'admin', NULL, NULL, b'0'); -INSERT INTO `api_test_case` (`id`, `name`, `priority`, `num`, `tags`, `status`, `last_report_status`, `last_report_id`, `pos`, `project_id`, `api_definition_id`, `version_id`, `environment_id`, `create_time`, `create_user`, `update_time`, `update_user`, `delete_time`, `delete_user`, `deleted`) VALUES ('3ee2ae9c-a680-4ed6-b115-1f6ab8980100', '查询Linux主机2', 'P0', 100002005, NULL, 'PROCESSING', NULL, '10005', 10000, '100001100001', '1003', '100570499574136985', 'admin', 1699500298164, 'admin', 1699500298164, 'admin', NULL, NULL, b'0'); -INSERT INTO `api_test_case` (`id`, `name`, `priority`, `num`, `tags`, `status`, `last_report_status`, `last_report_id`, `pos`, `project_id`, `api_definition_id`, `version_id`, `environment_id`, `create_time`, `create_user`, `update_time`, `update_user`, `delete_time`, `delete_user`, `deleted`) VALUES ('3ee2ae9c-a680-4ed6-b115-1f6ab8980589', '查询Linux主机3', 'P0', 100002006, NULL, 'PROCESSING', NULL, '10006', 10000, '100001100001', '1004', '100570499574136985', 'admin', 1699500298164, 'admin', 1699500298164, 'admin', NULL, NULL, b'0'); -INSERT INTO `api_test_case` (`id`, `name`, `priority`, `num`, `tags`, `status`, `last_report_status`, `last_report_id`, `pos`, `project_id`, `api_definition_id`, `version_id`, `environment_id`, `create_time`, `create_user`, `update_time`, `update_user`, `delete_time`, `delete_user`, `deleted`) VALUES ('3ee2ae9c-a680-4ed6-b115-1f6ab8980553', '查询Linux主机4', 'P0', 100002007, NULL, 'PROCESSING', NULL, '10007', 10000, '100001100001', '1005', '100570499574136985', 'admin', 1699500298164, 'admin', 1699500298164, 'admin', NULL, NULL, b'0'); -INSERT INTO `api_test_case` (`id`, `name`, `priority`, `num`, `tags`, `status`, `last_report_status`, `last_report_id`, `pos`, `project_id`, `api_definition_id`, `version_id`, `environment_id`, `create_time`, `create_user`, `update_time`, `update_user`, `delete_time`, `delete_user`, `deleted`) VALUES ('3ee2ae9c-a680-4ed6-b115-1f6ab8980104', '查询Linux主机5', 'P0', 100002008, NULL, 'PROCESSING', NULL, '10008', 10000, '100001100001', '1005', '100570499574136985', 'admin', 1699500298164, 'admin', 1699500298164, 'admin', NULL, NULL, b'0'); -INSERT INTO `api_test_case` (`id`, `name`, `priority`, `num`, `tags`, `status`, `last_report_status`, `last_report_id`, `pos`, `project_id`, `api_definition_id`, `version_id`, `environment_id`, `create_time`, `create_user`, `update_time`, `update_user`, `delete_time`, `delete_user`, `deleted`) VALUES ('3ee2ae9c-a680-4ed6-b115-1f6ab8980545', '查询Linux主机6', 'P0', 100002009, NULL, 'PROCESSING', NULL, NULL, 10000, '100001100001', '1005', '100570499574136985', 'admin', 1699500298164, 'admin', 1699500298164, 'admin', NULL, NULL, b'0'); +INSERT INTO `api_test_case` (`id`, `name`, `priority`, `num`, `tags`, `status`, `last_report_status`, `last_report_id`, `pos`, `project_id`, `api_definition_id`, `version_id`, `environment_id`, `create_time`, `create_user`, `update_time`, `update_user`, `delete_time`, `delete_user`, `deleted`) VALUES ('12df5721-c5e6-a38b-e999-3eafcb992094', '查询windows主机1', 'P0', 100002001, NULL, 'PROCESSING', 'PENDING', '10001', 10000, '100001100001', '1001', '100570499574136985', 'admin', 1699500298164, 'admin', 1699500298164, 'admin', NULL, NULL, b'0'); +INSERT INTO `api_test_case` (`id`, `name`, `priority`, `num`, `tags`, `status`, `last_report_status`, `last_report_id`, `pos`, `project_id`, `api_definition_id`, `version_id`, `environment_id`, `create_time`, `create_user`, `update_time`, `update_user`, `delete_time`, `delete_user`, `deleted`) VALUES ('12df5721-c5e6-a38b-e999-3eafcb992100', '查询windows主机2', 'P0', 100002002, NULL, 'PROCESSING', 'PENDING', '10002', 10000, '100001100001', '1001', '100570499574136985', 'admin', 1699500298164, 'admin', 1699500298164, 'admin', NULL, NULL, b'0'); +INSERT INTO `api_test_case` (`id`, `name`, `priority`, `num`, `tags`, `status`, `last_report_status`, `last_report_id`, `pos`, `project_id`, `api_definition_id`, `version_id`, `environment_id`, `create_time`, `create_user`, `update_time`, `update_user`, `delete_time`, `delete_user`, `deleted`) VALUES ('12df5721-c5e6-a38b-e999-3eafcb992233', '查询windows主机3', 'P0', 100002003, NULL, 'PROCESSING', 'PENDING', '10003', 10000, '100001100001', '1002', '100570499574136985', 'admin', 1699500298164, 'admin', 1699500298164, 'admin', NULL, NULL, b'0'); +INSERT INTO `api_test_case` (`id`, `name`, `priority`, `num`, `tags`, `status`, `last_report_status`, `last_report_id`, `pos`, `project_id`, `api_definition_id`, `version_id`, `environment_id`, `create_time`, `create_user`, `update_time`, `update_user`, `delete_time`, `delete_user`, `deleted`) VALUES ('3ee2ae9c-a680-4ed6-b115-1f6ab8980973', '查询Linux主机1', 'P0', 100002004, NULL, 'PROCESSING', 'PENDING', '10004', 10000, '100001100001', '1002', '100570499574136985', 'admin', 1699500298164, 'admin', 1699500298164, 'admin', NULL, NULL, b'0'); +INSERT INTO `api_test_case` (`id`, `name`, `priority`, `num`, `tags`, `status`, `last_report_status`, `last_report_id`, `pos`, `project_id`, `api_definition_id`, `version_id`, `environment_id`, `create_time`, `create_user`, `update_time`, `update_user`, `delete_time`, `delete_user`, `deleted`) VALUES ('3ee2ae9c-a680-4ed6-b115-1f6ab8980100', '查询Linux主机2', 'P0', 100002005, NULL, 'PROCESSING', 'PENDING', '10005', 10000, '100001100001', '1003', '100570499574136985', 'admin', 1699500298164, 'admin', 1699500298164, 'admin', NULL, NULL, b'0'); +INSERT INTO `api_test_case` (`id`, `name`, `priority`, `num`, `tags`, `status`, `last_report_status`, `last_report_id`, `pos`, `project_id`, `api_definition_id`, `version_id`, `environment_id`, `create_time`, `create_user`, `update_time`, `update_user`, `delete_time`, `delete_user`, `deleted`) VALUES ('3ee2ae9c-a680-4ed6-b115-1f6ab8980589', '查询Linux主机3', 'P0', 100002006, NULL, 'PROCESSING', 'PENDING', '10006', 10000, '100001100001', '1004', '100570499574136985', 'admin', 1699500298164, 'admin', 1699500298164, 'admin', NULL, NULL, b'0'); +INSERT INTO `api_test_case` (`id`, `name`, `priority`, `num`, `tags`, `status`, `last_report_status`, `last_report_id`, `pos`, `project_id`, `api_definition_id`, `version_id`, `environment_id`, `create_time`, `create_user`, `update_time`, `update_user`, `delete_time`, `delete_user`, `deleted`) VALUES ('3ee2ae9c-a680-4ed6-b115-1f6ab8980553', '查询Linux主机4', 'P0', 100002007, NULL, 'PROCESSING', 'PENDING', '10007', 10000, '100001100001', '1005', '100570499574136985', 'admin', 1699500298164, 'admin', 1699500298164, 'admin', NULL, NULL, b'0'); +INSERT INTO `api_test_case` (`id`, `name`, `priority`, `num`, `tags`, `status`, `last_report_status`, `last_report_id`, `pos`, `project_id`, `api_definition_id`, `version_id`, `environment_id`, `create_time`, `create_user`, `update_time`, `update_user`, `delete_time`, `delete_user`, `deleted`) VALUES ('3ee2ae9c-a680-4ed6-b115-1f6ab8980104', '查询Linux主机5', 'P0', 100002008, NULL, 'PROCESSING', 'PENDING', '10008', 10000, '100001100001', '1005', '100570499574136985', 'admin', 1699500298164, 'admin', 1699500298164, 'admin', NULL, NULL, b'0'); +INSERT INTO `api_test_case` (`id`, `name`, `priority`, `num`, `tags`, `status`, `last_report_status`, `last_report_id`, `pos`, `project_id`, `api_definition_id`, `version_id`, `environment_id`, `create_time`, `create_user`, `update_time`, `update_user`, `delete_time`, `delete_user`, `deleted`) VALUES ('3ee2ae9c-a680-4ed6-b115-1f6ab8980545', '查询Linux主机6', 'P0', 100002009, NULL, 'PROCESSING', 'PENDING', NULL, 10000, '100001100001', '1005', '100570499574136985', 'admin', 1699500298164, 'admin', 1699500298164, 'admin', NULL, NULL, b'0'); DELETE FROM `api_definition_module` WHERE `id` in ('10001', 'case-moduleId'); INSERT INTO `api_definition_module` (`id`, `name`, `parent_id`, `project_id`, `pos`, `create_time`, `update_time`, `update_user`, `create_user`) VALUES ('10001', 'module1', 'NONE', '100001100001', 10, 0, 0, 'admin', 'admin'); @@ -116,13 +116,13 @@ INSERT INTO `test_resource_pool` (`id`, `name`, `type`, `description`, `enable`, DELETE FROM `api_scenario` WHERE `id` in ('1', '2', '3', '4','5','6', '7', '8', '9'); INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('1', 'Scenario 1', 'P0', 'Completed', 10, '95%', 'Passed', 'report_1', 1001, b'0', 1, 'version_1', 'ref_1', b'1', '100001100001', 'module_1', 'Description 1', '[\"tag1\",\"tag2\"]', b'0', 'env_1', 'admin', 1640772861000, NULL, NULL, 'admin', 1640772861000); INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('2', 'Scenario 2', 'P1', 'In Progress', 15, '80%', 'Running', 'report_2', 1002, b'0', 2, 'version_2', 'ref_2', b'0', '100001100001', 'module_2', 'Description 2', '[\"tag2\",\"tag3\"]', b'0', NULL, 'admin', 1640772862000, NULL, NULL, 'admin', 1640772862000); -INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('3', 'Scenario 3', 'P2', 'Not Planned', 8, 'Calculating', NULL, NULL, 1003, b'0', 3, 'version_3', 'ref_3', b'1', '100001100001', 'module_3', 'Description 3', '[\"tag1\",\"tag3\"]', b'1', 'env_2', 'admin', 1640772863000, NULL, NULL, 'admin', 1640772863000); +INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('3', 'Scenario 3', 'P2', 'Not Planned', 8, 'Calculating', 'PENDING', NULL, 1003, b'0', 3, 'version_3', 'ref_3', b'1', '100001100001', 'module_3', 'Description 3', '[\"tag1\",\"tag3\"]', b'1', 'env_2', 'admin', 1640772863000, NULL, NULL, 'admin', 1640772863000); INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('4', 'Scenario 4', 'P1', 'Completed', 12, '90%', 'Passed', 'report_4', 1004, b'0', 4, 'version_4', 'ref_4', b'0', '100001100001', 'module_4', 'Description 4', '[\"tag1\",\"tag2\"]', b'0', NULL, 'admin', 1640772864000, NULL, NULL, 'admin', 1640772864000); INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('5', 'Scenario 5', 'P0', 'In Progress', 18, '75%', 'Running', 'report_5', 1005, b'0', 5, 'version_5', 'ref_5', b'1', '100001100001', 'module_5', 'Description 5', '[\"tag2\",\"tag3\"]', b'1', 'env_3', 'admin', 1640772865000, NULL, NULL, 'admin', 1640772865000); -INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('6', 'Scenario 6', 'P2', 'Not Planned', 10, 'Calculating', NULL, NULL, 1006, b'0', 6, 'version_6', 'ref_6', b'0', '100001100001', 'module_6', 'Description 6', '[\"tag1\",\"tag3\"]', b'0', NULL, 'admin', 1640772866000, NULL, NULL, 'admin', 1640772866000); +INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('6', 'Scenario 6', 'P2', 'Not Planned', 10, 'Calculating', 'PENDING', NULL, 1006, b'0', 6, 'version_6', 'ref_6', b'0', '100001100001', 'module_6', 'Description 6', '[\"tag1\",\"tag3\"]', b'0', NULL, 'admin', 1640772866000, NULL, NULL, 'admin', 1640772866000); INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('7', 'Scenario 7', 'P1', 'Completed', 14, '85%', 'Passed', 'report_7', 1007, b'0', 7, 'version_7', 'ref_7', b'1', '100001100001', 'module_7', 'Description 7', '[\"tag1\",\"tag2\"]', b'1', 'env_4', 'admin', 1640772867000, NULL, NULL, 'admin', 1640772867000); INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('8', 'Scenario 8', 'P0', 'In Progress', 20, '70%', 'Running', 'report_8', 1008, b'0', 8, 'version_8', 'ref_8', b'0', '100001100001', 'module_8', 'Description 8', '[\"tag2\",\"tag3\"]', b'0', NULL, 'admin', 1640772868000, NULL, NULL, 'admin', 1640772868000); -INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('9', 'Scenario 9', 'P2', 'Not Planned', 16, 'Calculating', NULL, NULL, 1009, b'0', 9, 'version_9', 'ref_9', b'1', '100001100001', 'module_9', 'Description 9', '[\"tag1\",\"tag3\"]', b'1', 'env_5', 'admin', 1640772869000, NULL, NULL, 'admin', 1640772869000); +INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('9', 'Scenario 9', 'P2', 'Not Planned', 16, 'Calculating', 'PENDING', NULL, 1009, b'0', 9, 'version_9', 'ref_9', b'1', '100001100001', 'module_9', 'Description 9', '[\"tag1\",\"tag3\"]', b'1', 'env_5', 'admin', 1640772869000, NULL, NULL, 'admin', 1640772869000); DELETE FROM `api_scenario_report` WHERE `id` in ('report_1', 'report_2', 'report_3', 'report_4','report_5','report_6', 'report_7', 'report_8', 'report_9','report_10','report_11', 'report_12', 'report_13', 'report_14','report_15','report_16', 'report_17', 'report_18', 'report_19','report_20'); INSERT INTO `api_scenario_report` (`id`, `name`, `test_plan_id`, `create_user`, `delete_time`, `delete_user`, `deleted`, `update_user`, `update_time`, `start_time`, `end_time`, `request_duration`, `status`, `trigger_mode`, `run_mode`, `pool_id`, `integrated`, `project_id`, `environment_id`, `error_count`, `fake_error_count`, `pending_count`, `success_count`, `assertion_count`, `assertion_success_count`, `request_error_rate`, `request_pending_rate`, `request_fake_error_rate`, `request_pass_rate`, `assertion_pass_rate`, `script_identifier`) VALUES ('report_1', 'Report 1', 'NONE', 'admin', NULL, NULL, b'0', 'admin', 1640773000000, UNIX_TIMESTAMP() * 1000, 1640774000000, 5000, 'SUCCESS', 'Manual', 'Standalone', '100660357777795313', b'0', '100001100001', 'env_1', 2, 0, 0, 2, 20, 18, '95%', 'Calculating', 'Calculating', '90%', '90%', 'script_1'); diff --git a/backend/services/api-test/src/test/resources/dml/init_functional_case_test.sql b/backend/services/api-test/src/test/resources/dml/init_functional_case_test.sql index 3fcf088295..c59801e1a2 100644 --- a/backend/services/api-test/src/test/resources/dml/init_functional_case_test.sql +++ b/backend/services/api-test/src/test/resources/dml/init_functional_case_test.sql @@ -14,12 +14,12 @@ VALUES ('gyq_associate_case_id_1', 100, 'TEST_MODULE_ID', 'project-associate-cas INSERT INTO functional_case_blob(id, steps, text_description, expected_result, prerequisite, description) VALUES ('gyq_associate_case_id_1', 'STEP', '1111', '', '', 'TEST'); INSERT INTO api_test_case(id, name, priority, num, tags, status, last_report_status, last_report_id, pos, project_id, api_definition_id, version_id, environment_id, create_time, create_user, update_time, update_user, delete_time, delete_user, deleted) -VALUES ('gyq_associate_api_case_id_1','gyq_associate_api_case_id_1','P0',1001, null, 'Underway', null, null, 100, 'project-associate-case-test', 'gyq_associate_api_definition_id_1', 'gyq_associate_version_id', 'gyq_associate_env_id', 1698058347559, 'admin',1698058347559,'admin',null,null,false); +VALUES ('gyq_associate_api_case_id_1','gyq_associate_api_case_id_1','P0',1001, null, 'Underway', 'PENDING', null, 100, 'project-associate-case-test', 'gyq_associate_api_definition_id_1', 'gyq_associate_version_id', 'gyq_associate_env_id', 1698058347559, 'admin',1698058347559,'admin',null,null,false); INSERT INTO api_test_case(id, name, priority, num, tags, status, last_report_status, last_report_id, pos, project_id, api_definition_id, version_id, environment_id, create_time, create_user, update_time, update_user, delete_time, delete_user, deleted) -VALUES ('gyq_associate_api_case_id_2','测试查询模块用','P0',1002, null, 'Underway', null, null, 200, 'project-associate-case-test', 'gyq_associate_api_definition_id_1', 'gyq_associate_version_id', 'gyq_associate_env_id', 1698058347559, 'admin',1698058347559,'admin',null,null,false); +VALUES ('gyq_associate_api_case_id_2','测试查询模块用','P0',1002, null, 'Underway', 'PENDING', null, 200, 'project-associate-case-test', 'gyq_associate_api_definition_id_1', 'gyq_associate_version_id', 'gyq_associate_env_id', 1698058347559, 'admin',1698058347559,'admin',null,null,false); INSERT INTO api_definition(id, name, protocol, method, path, status, num, tags, pos, project_id, module_id, latest, version_id, ref_id, description, create_time, create_user, update_time, update_user, delete_user, delete_time, deleted) diff --git a/backend/services/api-test/src/test/resources/dml/init_functional_scenario_test.sql b/backend/services/api-test/src/test/resources/dml/init_functional_scenario_test.sql index 411186c5b6..d01a60d40e 100644 --- a/backend/services/api-test/src/test/resources/dml/init_functional_scenario_test.sql +++ b/backend/services/api-test/src/test/resources/dml/init_functional_scenario_test.sql @@ -14,8 +14,8 @@ VALUES ('gyq_associate_scenario_id_1', 100, 'TEST_MODULE_ID', 'project-associate INSERT INTO functional_case_blob(id, steps, text_description, expected_result, prerequisite, description) VALUES ('gyq_associate_scenario_id_1', 'STEP', '1111', '', '', 'TEST'); INSERT INTO api_scenario(id, name, priority, status, last_report_status, last_report_id, num, pos, version_id, ref_id, project_id, module_id, description, tags, create_user, create_time, delete_time, delete_user, update_user, update_time, deleted) -VALUES ('associate_gyq_api_scenario_one', 'api_scenario', 'p1', 'test-api-status', null, null,1000001, 1,'v1.10', 'associate_gyq_api_scenario_one','project-associate-scenario-test', 'gyq_associate_test_scenario_module', null,null,'admin', UNIX_TIMESTAMP() * 1000,null,null,'admin', UNIX_TIMESTAMP() * 1000, false), - ('associate_gyq_api_scenario_two', 'api_scenario_two', 'p1', 'test-api-status', null, null,1000001, 1,'v1.10', 'associate_gyq_api_scenario_two','project-associate-scenario-test', 'gyq_associate_test_scenario_module', null,null,'admin', UNIX_TIMESTAMP() * 1000,null,null,'admin', UNIX_TIMESTAMP() * 1000, false); +VALUES ('associate_gyq_api_scenario_one', 'api_scenario', 'p1', 'test-api-status', 'PENDING', null,1000001, 1,'v1.10', 'associate_gyq_api_scenario_one','project-associate-scenario-test', 'gyq_associate_test_scenario_module', null,null,'admin', UNIX_TIMESTAMP() * 1000,null,null,'admin', UNIX_TIMESTAMP() * 1000, false), + ('associate_gyq_api_scenario_two', 'api_scenario_two', 'p1', 'test-api-status', 'PENDING', null,1000001, 1,'v1.10', 'associate_gyq_api_scenario_two','project-associate-scenario-test', 'gyq_associate_test_scenario_module', null,null,'admin', UNIX_TIMESTAMP() * 1000,null,null,'admin', UNIX_TIMESTAMP() * 1000, false); INSERT INTO api_scenario_module(id, name,parent_id, project_id, pos, create_time, update_time, update_user, create_user) diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemProjectControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemProjectControllerTests.java index 5cbe322091..36a583c4f9 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemProjectControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemProjectControllerTests.java @@ -1174,7 +1174,7 @@ public class SystemProjectControllerTests extends BaseTest { apiTestCase.setUpdateUser("admin"); apiTestCase.setVersionId("1.0"); apiTestCase.setDeleted(false); - apiTestCaseMapper.insert(apiTestCase); + apiTestCaseMapper.insertSelective(apiTestCase); ApiTestCase anotherCase = new ApiTestCase(); anotherCase.setId("test-apiTestCaseId1"); anotherCase.setApiDefinitionId("apiDefinitionId"); @@ -1190,7 +1190,7 @@ public class SystemProjectControllerTests extends BaseTest { anotherCase.setUpdateUser("admin"); anotherCase.setVersionId("1.0"); anotherCase.setDeleted(false); - apiTestCaseMapper.insert(anotherCase); + apiTestCaseMapper.insertSelective(anotherCase); PosRequest request = new PosRequest(); request.setProjectId(DEFAULT_PROJECT_ID); request.setTargetId(apiTestCase.getId()); diff --git a/backend/services/system-setting/src/test/resources/dml/init_aspect.sql b/backend/services/system-setting/src/test/resources/dml/init_aspect.sql index 184478a05f..803906be31 100644 --- a/backend/services/system-setting/src/test/resources/dml/init_aspect.sql +++ b/backend/services/system-setting/src/test/resources/dml/init_aspect.sql @@ -38,7 +38,7 @@ INSERT INTO api_definition(id, name, protocol, method, path, status, num, tags, VALUES ('aspect_gyq_api_one', 'api_test','HTTP', 'POST','api/test','test-api-status', 1000001, null, 1, '100001100001' , 'test_module', true, 'v1.10','aspect_gyq_api_one', null, UNIX_TIMESTAMP() * 1000,'admin', UNIX_TIMESTAMP() * 1000,'admin', null,null,false); INSERT INTO api_scenario(id, name, priority, status, last_report_status, last_report_id, num, pos, version_id, ref_id, project_id, module_id, description, tags, create_user, create_time, delete_time, delete_user, update_user, update_time) -VALUES ('aspect_gyq_api_scenario_one', 'api_scenario', 'p1', 'test-api-status', null, null,1000001, 1,'v1.10', 'aspect_gyq_api_scenario_one','100001100001', 'test_module', null,null,'admin', UNIX_TIMESTAMP() * 1000,null,null,'admin', UNIX_TIMESTAMP() * 1000); +VALUES ('aspect_gyq_api_scenario_one', 'api_scenario', 'p1', 'test-api-status', 'PENDING', null,1000001, 1,'v1.10', 'aspect_gyq_api_scenario_one','100001100001', 'test_module', null,null,'admin', UNIX_TIMESTAMP() * 1000,null,null,'admin', UNIX_TIMESTAMP() * 1000); INSERT INTO test_plan(id, project_id, group_id, module_id, name, status, type, tags, create_time, create_user, update_time, update_user, planned_start_time, planned_end_time, actual_start_time, diff --git a/backend/services/system-setting/src/test/resources/dml/init_task_center.sql b/backend/services/system-setting/src/test/resources/dml/init_task_center.sql index 6d6e2e07c8..c2531c73e6 100644 --- a/backend/services/system-setting/src/test/resources/dml/init_task_center.sql +++ b/backend/services/system-setting/src/test/resources/dml/init_task_center.sql @@ -2,13 +2,13 @@ DELETE FROM `api_scenario` WHERE `id` in ('1', '2', '3', '4','5','6', '7', '8', '9'); INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('1', 'Scenario 1', 'P0', 'Completed', 10, '95%', 'Passed', 'report_1', 1001, b'0', 1, 'version_1', 'ref_1', b'1', '100001100001', 'module_1', 'Description 1', 'Tag1,Tag2', b'0', 'env_1', 'admin', 1640772861000, NULL, NULL, 'admin', 1640772861000); INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('2', 'Scenario 2', 'P1', 'In Progress', 15, '80%', 'Running', 'report_2', 1002, b'0', 2, 'version_2', 'ref_2', b'0', '100001100001', 'module_2', 'Description 2', 'Tag2,Tag3', b'0', NULL, 'admin', 1640772862000, NULL, NULL, 'admin', 1640772862000); -INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('3', 'Scenario 3', 'P2', 'Not Planned', 8, 'Calculating', NULL, NULL, 1003, b'0', 3, 'version_3', 'ref_3', b'1', '100001100001', 'module_3', 'Description 3', 'Tag1,Tag3', b'1', 'env_2', 'admin', 1640772863000, NULL, NULL, 'admin', 1640772863000); +INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('3', 'Scenario 3', 'P2', 'Not Planned', 8, 'Calculating', 'PENDING', NULL, 1003, b'0', 3, 'version_3', 'ref_3', b'1', '100001100001', 'module_3', 'Description 3', 'Tag1,Tag3', b'1', 'env_2', 'admin', 1640772863000, NULL, NULL, 'admin', 1640772863000); INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('4', 'Scenario 4', 'P1', 'Completed', 12, '90%', 'Passed', 'report_4', 1004, b'0', 4, 'version_4', 'ref_4', b'0', '100001100001', 'module_4', 'Description 4', 'Tag1,Tag2', b'0', NULL, 'admin', 1640772864000, NULL, NULL, 'admin', 1640772864000); INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('5', 'Scenario 5', 'P0', 'In Progress', 18, '75%', 'Running', 'report_5', 1005, b'0', 5, 'version_5', 'ref_5', b'1', '100001100001', 'module_5', 'Description 5', 'Tag2,Tag3', b'1', 'env_3', 'admin', 1640772865000, NULL, NULL, 'admin', 1640772865000); -INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('6', 'Scenario 6', 'P2', 'Not Planned', 10, 'Calculating', NULL, NULL, 1006, b'0', 6, 'version_6', 'ref_6', b'0', '100001100001', 'module_6', 'Description 6', 'Tag1,Tag3', b'0', NULL, 'admin', 1640772866000, NULL, NULL, 'admin', 1640772866000); +INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('6', 'Scenario 6', 'P2', 'Not Planned', 10, 'Calculating', 'PENDING', NULL, 1006, b'0', 6, 'version_6', 'ref_6', b'0', '100001100001', 'module_6', 'Description 6', 'Tag1,Tag3', b'0', NULL, 'admin', 1640772866000, NULL, NULL, 'admin', 1640772866000); INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('7', 'Scenario 7', 'P1', 'Completed', 14, '85%', 'Passed', 'report_7', 1007, b'0', 7, 'version_7', 'ref_7', b'1', '100001100001', 'module_7', 'Description 7', 'Tag1,Tag2', b'1', 'env_4', 'admin', 1640772867000, NULL, NULL, 'admin', 1640772867000); INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('8', 'Scenario 8', 'P0', 'In Progress', 20, '70%', 'Running', 'report_8', 1008, b'0', 8, 'version_8', 'ref_8', b'0', '100001100001', 'module_8', 'Description 8', 'Tag2,Tag3', b'0', NULL, 'admin', 1640772868000, NULL, NULL, 'admin', 1640772868000); -INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('9', 'Scenario 9', 'P2', 'Not Planned', 16, 'Calculating', NULL, NULL, 1009, b'0', 9, 'version_9', 'ref_9', b'1', '100001100001', 'module_9', 'Description 9', 'Tag1,Tag3', b'1', 'env_5', 'admin', 1640772869000, NULL, NULL, 'admin', 1640772869000); +INSERT INTO `api_scenario` (`id`, `name`, `priority`, `status`, `step_total`, `request_pass_rate`, `last_report_status`, `last_report_id`, `num`, `deleted`, `pos`, `version_id`, `ref_id`, `latest`, `project_id`, `module_id`, `description`, `tags`, `grouped`, `environment_id`, `create_user`, `create_time`, `delete_time`, `delete_user`, `update_user`, `update_time`) VALUES ('9', 'Scenario 9', 'P2', 'Not Planned', 16, 'Calculating', 'PENDING', NULL, 1009, b'0', 9, 'version_9', 'ref_9', b'1', '100001100001', 'module_9', 'Description 9', 'Tag1,Tag3', b'1', 'env_5', 'admin', 1640772869000, NULL, NULL, 'admin', 1640772869000); DELETE FROM `schedule` WHERE `id` in ('1', '2', '3', '4','5','6', '7', '8', '9','10','11', '12', '13', '14','15','16', '17', '18', '19','20'); diff --git a/backend/services/test-plan/src/test/java/io/metersphere/plan/service/TestPlanTestService.java b/backend/services/test-plan/src/test/java/io/metersphere/plan/service/TestPlanTestService.java index 1105cc7c5c..889b7dd750 100644 --- a/backend/services/test-plan/src/test/java/io/metersphere/plan/service/TestPlanTestService.java +++ b/backend/services/test-plan/src/test/java/io/metersphere/plan/service/TestPlanTestService.java @@ -176,6 +176,7 @@ public class TestPlanTestService { apiScenario.setDeleted(false); apiScenario.setStepTotal(1); apiScenario.setRequestPassRate("100"); + apiScenario.setLastReportStatus("UN_EXECUTED"); returnList.add(apiScenario); } apiScenarioMapper.batchInsert(returnList); @@ -335,6 +336,7 @@ public class TestPlanTestService { apiTestCase.setCreateUser("admin"); apiTestCase.setUpdateUser("admin"); apiTestCase.setUpdateTime(System.currentTimeMillis()); + apiTestCase.setLastReportStatus("UN_EXECUTED"); returnList.add(apiTestCase); } apiTestCaseMapper.batchInsert(returnList);