parent
8e41fe86cf
commit
9dab15f039
|
@ -165,6 +165,11 @@ public class ApiExecuteService {
|
|||
//检查TCP数据结构,等其他进行处理
|
||||
tcpApiParamService.checkTestElement(request.getTestElement());
|
||||
|
||||
String testId = request.getTestElement() != null &&
|
||||
CollectionUtils.isNotEmpty(request.getTestElement().getHashTree()) &&
|
||||
CollectionUtils.isNotEmpty(request.getTestElement().getHashTree().get(0).getHashTree()) ?
|
||||
request.getTestElement().getHashTree().get(0).getHashTree().get(0).getName() : request.getId();
|
||||
|
||||
HashTree hashTree = request.getTestElement().generateHashTree(config);
|
||||
if (LoggerUtil.getLogger().isDebugEnabled()) {
|
||||
LoggerUtil.debug("生成执行JMX内容【 " + request.getTestElement().getJmx(hashTree) + " 】");
|
||||
|
@ -175,10 +180,6 @@ public class ApiExecuteService {
|
|||
runMode = ApiRunMode.API_PLAN.name();
|
||||
}
|
||||
|
||||
String testId = request.getTestElement() != null &&
|
||||
CollectionUtils.isNotEmpty(request.getTestElement().getHashTree()) &&
|
||||
CollectionUtils.isNotEmpty(request.getTestElement().getHashTree().get(0).getHashTree()) ?
|
||||
request.getTestElement().getHashTree().get(0).getHashTree().get(0).getName() : request.getId();
|
||||
JmeterRunRequestDTO runRequest = new JmeterRunRequestDTO(testId, request.getId(), runMode, hashTree);
|
||||
runRequest.setDebug(request.isDebug());
|
||||
// 开始执行
|
||||
|
|
|
@ -1,10 +1,123 @@
|
|||
ALTER TABLE `test_plan_api_case`
|
||||
ADD INDEX planIdIndex (`test_plan_id`);
|
||||
ALTER TABLE `test_plan_api_scenario`
|
||||
ADD INDEX planIdIndex (`test_plan_id`);
|
||||
ALTER TABLE `test_plan_load_case`
|
||||
ADD INDEX planIdIndex (`test_plan_id`);
|
||||
ALTER TABLE `test_case_issues`
|
||||
ADD INDEX issues_id_index (`issues_id`);
|
||||
ALTER TABLE `test_plan_report`
|
||||
ADD INDEX planIdIndex (`test_plan_id`);
|
||||
|
||||
DROP PROCEDURE IF EXISTS schema_change_api;
|
||||
DELIMITER //
|
||||
CREATE PROCEDURE schema_change_api() BEGIN
|
||||
DECLARE CurrentDatabase VARCHAR(100);
|
||||
SELECT DATABASE() INTO CurrentDatabase;
|
||||
IF NOT EXISTS (SELECT * FROM information_schema.statistics WHERE table_schema=CurrentDatabase AND table_name = 'test_plan_api_case' AND index_name = 'plan_id_index') THEN
|
||||
ALTER TABLE `test_plan_api_case` ADD INDEX plan_id_index ( `test_plan_id` );
|
||||
END IF;
|
||||
END//
|
||||
DELIMITER ;
|
||||
CALL schema_change_api();
|
||||
|
||||
DROP PROCEDURE IF EXISTS schema_change_api_one;
|
||||
DELIMITER //
|
||||
CREATE PROCEDURE schema_change_api_one() BEGIN
|
||||
DECLARE CurrentDatabase VARCHAR(100);
|
||||
SELECT DATABASE() INTO CurrentDatabase;
|
||||
IF EXISTS (SELECT * FROM information_schema.statistics WHERE table_schema=CurrentDatabase AND table_name = 'test_plan_api_case' AND index_name = 'planIdIndex') THEN
|
||||
ALTER TABLE `test_plan_api_case` DROP INDEX planIdIndex;
|
||||
END IF;
|
||||
END//
|
||||
DELIMITER ;
|
||||
CALL schema_change_api_one();
|
||||
|
||||
DROP PROCEDURE IF EXISTS schema_change_scenario;
|
||||
DELIMITER //
|
||||
CREATE PROCEDURE schema_change_scenario() BEGIN
|
||||
DECLARE CurrentDatabase VARCHAR(100);
|
||||
SELECT DATABASE() INTO CurrentDatabase;
|
||||
IF NOT EXISTS (SELECT * FROM information_schema.statistics WHERE table_schema=CurrentDatabase AND table_name = 'test_plan_api_scenario' AND index_name = 'plan_id_index') THEN
|
||||
ALTER TABLE `test_plan_api_scenario` ADD INDEX plan_id_index ( `test_plan_id` );
|
||||
END IF;
|
||||
END//
|
||||
DELIMITER ;
|
||||
CALL schema_change_scenario();
|
||||
|
||||
DROP PROCEDURE IF EXISTS schema_change_scenario_one;
|
||||
DELIMITER //
|
||||
CREATE PROCEDURE schema_change_scenario_one() BEGIN
|
||||
DECLARE CurrentDatabase VARCHAR(100);
|
||||
SELECT DATABASE() INTO CurrentDatabase;
|
||||
IF EXISTS (SELECT * FROM information_schema.statistics WHERE table_schema=CurrentDatabase AND table_name = 'test_plan_api_scenario' AND index_name = 'planIdIndex') THEN
|
||||
ALTER TABLE `test_plan_api_scenario` DROP INDEX planIdIndex;
|
||||
END IF;
|
||||
END//
|
||||
DELIMITER ;
|
||||
CALL schema_change_scenario_one();
|
||||
|
||||
|
||||
DROP PROCEDURE IF EXISTS schema_change_load;
|
||||
DELIMITER //
|
||||
CREATE PROCEDURE schema_change_load() BEGIN
|
||||
DECLARE CurrentDatabase VARCHAR(100);
|
||||
SELECT DATABASE() INTO CurrentDatabase;
|
||||
IF NOT EXISTS (SELECT * FROM information_schema.statistics WHERE table_schema=CurrentDatabase AND table_name = 'test_plan_load_case' AND index_name = 'plan_id_index') THEN
|
||||
ALTER TABLE `test_plan_load_case` ADD INDEX plan_id_index ( `test_plan_id` );
|
||||
END IF;
|
||||
END//
|
||||
DELIMITER ;
|
||||
CALL schema_change_load();
|
||||
|
||||
DROP PROCEDURE IF EXISTS schema_change_load_one;
|
||||
DELIMITER //
|
||||
CREATE PROCEDURE schema_change_load_one() BEGIN
|
||||
DECLARE CurrentDatabase VARCHAR(100);
|
||||
SELECT DATABASE() INTO CurrentDatabase;
|
||||
IF EXISTS (SELECT * FROM information_schema.statistics WHERE table_schema=CurrentDatabase AND table_name = 'test_plan_load_case' AND index_name = 'planIdIndex') THEN
|
||||
ALTER TABLE `test_plan_load_case` DROP INDEX planIdIndex;
|
||||
END IF;
|
||||
END//
|
||||
DELIMITER ;
|
||||
CALL schema_change_load_one();
|
||||
|
||||
|
||||
DROP PROCEDURE IF EXISTS schema_change_report;
|
||||
DELIMITER //
|
||||
CREATE PROCEDURE schema_change_report() BEGIN
|
||||
DECLARE CurrentDatabase VARCHAR(100);
|
||||
SELECT DATABASE() INTO CurrentDatabase;
|
||||
IF NOT EXISTS (SELECT * FROM information_schema.statistics WHERE table_schema=CurrentDatabase AND table_name = 'test_plan_report' AND index_name = 'plan_id_index') THEN
|
||||
ALTER TABLE `test_plan_report` ADD INDEX plan_id_index ( `test_plan_id` );
|
||||
END IF;
|
||||
END//
|
||||
DELIMITER ;
|
||||
CALL schema_change_report();
|
||||
|
||||
DROP PROCEDURE IF EXISTS schema_change_report_one;
|
||||
DELIMITER //
|
||||
CREATE PROCEDURE schema_change_report_one() BEGIN
|
||||
DECLARE CurrentDatabase VARCHAR(100);
|
||||
SELECT DATABASE() INTO CurrentDatabase;
|
||||
IF EXISTS (SELECT * FROM information_schema.statistics WHERE table_schema=CurrentDatabase AND table_name = 'test_plan_report' AND index_name = 'planIdIndex') THEN
|
||||
ALTER TABLE `test_plan_report` DROP INDEX planIdIndex;
|
||||
END IF;
|
||||
END//
|
||||
DELIMITER ;
|
||||
CALL schema_change_report_one();
|
||||
|
||||
|
||||
DROP PROCEDURE IF EXISTS schema_change_issue;
|
||||
DELIMITER //
|
||||
CREATE PROCEDURE schema_change_issue() BEGIN
|
||||
DECLARE CurrentDatabase VARCHAR(100);
|
||||
SELECT DATABASE() INTO CurrentDatabase;
|
||||
IF NOT EXISTS (SELECT * FROM information_schema.statistics WHERE table_schema=CurrentDatabase AND table_name = 'test_case_issues' AND index_name = 'issues_id_index') THEN
|
||||
ALTER TABLE `test_case_issues` ADD INDEX issues_id_index ( `issues_id` );
|
||||
END IF;
|
||||
END//
|
||||
DELIMITER ;
|
||||
CALL schema_change_issue();
|
||||
|
||||
DROP PROCEDURE IF EXISTS schema_change;
|
||||
DELIMITER //
|
||||
CREATE PROCEDURE schema_change() BEGIN
|
||||
DECLARE CurrentDatabase VARCHAR(100);
|
||||
SELECT DATABASE() INTO CurrentDatabase;
|
||||
IF NOT EXISTS (SELECT * FROM information_schema.statistics WHERE table_schema=CurrentDatabase AND table_name = 'api_scenario_report' AND index_name = 'update_time_index') THEN
|
||||
ALTER TABLE `api_scenario_report` ADD INDEX update_time_index ( `update_time` );
|
||||
END IF;
|
||||
END//
|
||||
DELIMITER ;
|
||||
CALL schema_change();
|
||||
|
|
|
@ -383,6 +383,9 @@ export default {
|
|||
this.result = getTestReviewTestCase(this.currentPage, this.pageSize, this.condition, (data) => {
|
||||
this.total = data.itemCount;
|
||||
this.tableData = data.listObject;
|
||||
setTimeout(() => {
|
||||
this.$refs.table.reloadTable()
|
||||
}, 200);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue