fix: 修复测试计划定时任务无法执行场景案例的问题,Mock配置页面操作优化

修复测试计划定时任务无法执行场景案例的问题,Mock配置页面操作优化
This commit is contained in:
song-tianyang 2021-04-25 15:32:44 +08:00 committed by 刘瑞斌
parent b47be42743
commit d3c88eb271
3 changed files with 8 additions and 8 deletions

View File

@ -935,6 +935,7 @@ public class TestPlanService {
planScenarioID + ":" + request.getTestPlanReportId(),
item.getName(), request.getTriggerMode() == null ? ReportTriggerMode.MANUAL.name() : request.getTriggerMode(),
request.getExecuteType(), item.getProjectId(), request.getReportUserID(),null);
apiScenarioReportMapper.insert(report);
group.setHashTree(scenarios);
testPlan.getHashTree().add(group);
returnId = request.getId();
@ -1056,7 +1057,6 @@ public class TestPlanService {
//执行场景执行任务
if (!planScenarioIdMap.isEmpty()) {
LogUtil.info("-------------- testplan schedule ---------- api case over -----------------");
SchedulePlanScenarioExecuteRequest scenarioRequest = new SchedulePlanScenarioExecuteRequest();
String senarionReportID = UUID.randomUUID().toString();
scenarioRequest.setId(senarionReportID);
@ -1076,7 +1076,6 @@ public class TestPlanService {
scenarioIsExcuting = true;
scenarioCaseIdArray= JSONArray.toJSONString(new ArrayList<>(planScenarioIdMap.keySet()));
}
LogUtil.info("-------------- testplan schedule ---------- scenario case over -----------------");
}

View File

@ -266,8 +266,7 @@ export default {
let mockConfigId = this.mockConfigData.mockConfig.id;
this.mockExpectConfig.mockConfigId = mockConfigId;
this.mockExpectConfig.id = "";
let formCheckResult = this.checkMockExpectForm("mockExpectForm");
this.cleanMockExpectConfig();
let formCheckResult = this.checkMockExpectForm("mockExpectForm", true);
},
cleanMockExpectConfig() {
this.showHeadTable = false;
@ -294,13 +293,16 @@ export default {
updateMockExpectConfig() {
this.checkMockExpectForm("mockExpectForm");
},
uploadMockExpectConfig() {
uploadMockExpectConfig(clearForm) {
let url = "/mockConfig/updateMockExpectConfig";
let param = this.mockExpectConfig;
this.$post(url, param, response => {
let returnData = response.data;
this.mockExpectConfig.id = returnData.id;
this.refreshMockInfo(param.mockConfigId);
if (clearForm) {
this.cleanMockExpectConfig();
}
this.$message({
type: 'success',
message: this.$t('commons.save_success'),
@ -314,10 +316,10 @@ export default {
this.mockConfigData = response.data;
});
},
checkMockExpectForm(formName) {
checkMockExpectForm(formName, clearForm) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.uploadMockExpectConfig();
this.uploadMockExpectConfig(clearForm);
return true;
} else {
return false;

View File

@ -151,7 +151,6 @@ export default {
watch: {
selectNodeIds() {
this.selectDataCounts = 0;
this.$refs.selectPopover.reload();
},
},
computed: {