Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
f721b21924
|
@ -49,7 +49,7 @@ public class MsIfController extends MsTestElement {
|
|||
ifController.setName(this.getName());
|
||||
ifController.setProperty(TestElement.TEST_CLASS, IfController.class.getName());
|
||||
ifController.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("IfControllerPanel"));
|
||||
ifController.setCondition("true");
|
||||
ifController.setCondition(this.getCondition());
|
||||
ifController.setEvaluateAll(false);
|
||||
ifController.setUseExpression(true);
|
||||
return ifController;
|
||||
|
|
|
@ -185,10 +185,7 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl
|
|||
}
|
||||
} else if (StringUtils.equals(this.runMode, ApiRunMode.JENKINS.name())) {
|
||||
apiDefinitionService.addResult(testResult);
|
||||
apiDefinitionExecResultService.saveApiResult(testResult, ApiRunMode.API.name());
|
||||
ApiDefinitionExecResult api=apiTestCaseService.getInfo(testId);
|
||||
report.setStatus(api.getStatus());
|
||||
|
||||
apiDefinitionExecResultService.saveApiResult(testResult, ApiRunMode.DEFINITION.name());
|
||||
|
||||
} else if (StringUtils.equals(this.runMode, ApiRunMode.JENKINS_API_PLAN.name())) {
|
||||
apiDefinitionService.addResult(testResult);
|
||||
|
@ -257,6 +254,9 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl
|
|||
}
|
||||
|
||||
private static void sendTask(ApiTestReport report, String reportUrl, TestResult testResult) {
|
||||
if (report == null) {
|
||||
return;
|
||||
}
|
||||
SystemParameterService systemParameterService = CommonBeanFactory.getBean(SystemParameterService.class);
|
||||
NoticeSendService noticeSendService = CommonBeanFactory.getBean(NoticeSendService.class);
|
||||
assert systemParameterService != null;
|
||||
|
|
|
@ -239,7 +239,7 @@ values ('test_plan_list',
|
|||
'[{"id":"name","label":"名称"},{"id":"userName","label":"负责人"},{"id":"status","label":"当前状态"},{"id":"stage","label":"测试阶段"},{"id":"testRate","label":"测试进度"},{"id":"projectName","label":"所属项目"},{"id":"plannedStartTime","label":"计划开始"},{"id":"plannedEndTime","label":"计划结束"},{"id":"actualStartTime","label":"实际开始"},{"id":"actualEndTime","label":"实际结束"},{"id":"tags","label":"标签"},{"id":"executionTimes","label":"执行次数"},{"id":"passRate","label":"通过率"}]');
|
||||
insert into system_header (type, props)
|
||||
values ('test_case_list',
|
||||
'[{"id":"tags","label":"标签"},{"id":"nodePath","label":"所属模块"},{"id":"updateTime","label":"更新时间"},{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"priority","label":"用例等级"},{"id":"reviewStatus","label":"评审状态"}]');
|
||||
'[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"priority","label":"用例等级"},{"id":"reviewStatus","label":"评审状态"},{"id":"tags","label":"标签"},{"id":"nodePath","label":"所属模块"},{"id":"updateTime","label":"更新时间"}]');
|
||||
insert into system_header (type, props)
|
||||
values ('test_plan_scenario_case',
|
||||
'[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"level","label":"用例等级"},{"id":"tagNames","label":"标签"},{"id":"userId","label":"创建人"},{"id":"updateTime","label":"最后更新时间"},{"id":"stepTotal","label":"通过"},{"id":"lastResult","label":"失败"},{"id":"passRate","label":"通过率"}]');
|
||||
|
|
|
@ -126,12 +126,13 @@ export default {
|
|||
let apiTest = this.$store.state.test;
|
||||
if (apiTest && apiTest.name) {
|
||||
this.$set(this.test, "name", apiTest.name);
|
||||
let blob = new Blob([apiTest.jmx.xml], {type: "application/octet-stream"});
|
||||
let suffixIndex = apiTest.jmx.name.lastIndexOf(".jmx");
|
||||
let jmxName = apiTest.jmx.name.substring(0, suffixIndex) + "_" + new Date().getTime() + ".jmx";
|
||||
let file = new File([blob], jmxName); // 保证每次从接口测试都能创建新的性能测试
|
||||
this.$refs.basicConfig.beforeUploadJmx(file);
|
||||
this.$refs.basicConfig.handleUpload({file: file});
|
||||
if (apiTest.jmx.scenarioId) {
|
||||
this.$refs.basicConfig.importScenario(apiTest.jmx.scenarioId);
|
||||
this.$refs.basicConfig.handleUpload();
|
||||
}
|
||||
if (apiTest.jmx.caseId) {
|
||||
this.$refs.basicConfig.importCase(apiTest.jmx);
|
||||
}
|
||||
if (JSON.stringify(apiTest.jmx.attachFiles) != "{}") {
|
||||
let attachFiles = [];
|
||||
for (let fileID in apiTest.jmx.attachFiles) {
|
||||
|
|
|
@ -116,6 +116,7 @@ import MsTableOperatorButton from "@/business/components/common/components/MsTab
|
|||
import MsDialogFooter from "@/business/components/common/components/MsDialogFooter";
|
||||
import ExistFiles from "@/business/components/performance/test/components/ExistFiles";
|
||||
import ExistScenarios from "@/business/components/performance/test/components/ExistScenarios";
|
||||
import {findThreadGroup} from "@/business/components/performance/test/model/ThreadGroup";
|
||||
|
||||
export default {
|
||||
name: "PerformanceBasicConfig",
|
||||
|
@ -329,12 +330,30 @@ export default {
|
|||
}
|
||||
return true;
|
||||
},
|
||||
beforeUploadJmx(file) {
|
||||
this.$refs.existFiles.beforeUploadFile(file);
|
||||
importScenario(scenarioId) {
|
||||
this.$refs.existScenarios.selectIds.add(scenarioId);
|
||||
},
|
||||
handleUpload(file) {
|
||||
importCase(caseObj) {
|
||||
console.log("case: ", caseObj);
|
||||
let suffixIndex = caseObj.name.lastIndexOf(".jmx");
|
||||
let jmxName = caseObj.name.substring(0, suffixIndex) + "_" + new Date().getTime() + ".jmx";
|
||||
let threadGroups = findThreadGroup(caseObj.xml, jmxName);
|
||||
threadGroups.forEach(tg => {
|
||||
tg.options = {};
|
||||
});
|
||||
this.fileChange(threadGroups);
|
||||
let file = new File([caseObj.xml], jmxName);
|
||||
this.uploadList.push(file);
|
||||
this.tableData.push({
|
||||
name: file.name,
|
||||
size: (file.size / 1024).toFixed(2) + ' KB',
|
||||
type: 'JMX',
|
||||
updateTime: file.lastModified,
|
||||
});
|
||||
},
|
||||
handleUpload() {
|
||||
// 从api创建的测试
|
||||
this.$refs.existFiles.handleUpload(file, true);
|
||||
this.$refs.existScenarios.handleImport();
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -468,7 +468,6 @@ export default {
|
|||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$get(url).then(res => {
|
||||
console.log(res.data.data)
|
||||
const data = res.data.data.map(item => ({
|
||||
value: item.id,
|
||||
label: item.name,
|
||||
|
@ -640,8 +639,8 @@ export default {
|
|||
if (tmp.steps == null) {
|
||||
tmp.steps = []
|
||||
}
|
||||
tmp.tags = JSON.parse(tmp.tags);
|
||||
Object.assign(this.form, tmp);
|
||||
console.log(this.form.selected)
|
||||
this.form.module = testCase.nodeId;
|
||||
this.getFileMetaData(testCase);
|
||||
/* testCase.selected = JSON.parse(testCase.testId);
|
||||
|
|
|
@ -395,6 +395,9 @@ export default {
|
|||
item.tags = JSON.parse(item.tags);
|
||||
}
|
||||
})*/
|
||||
this.tableData.forEach((item) => {
|
||||
item.tags = JSON.parse(item.tags);
|
||||
})
|
||||
if (this.$refs.table) {
|
||||
this.$refs.table.doLayout()
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 07951ba17aef6f29e50cfd68e40de3266f9a60cd
|
||||
Subproject commit 2115bd28a90854d2b6276a90878934715498c584
|
Loading…
Reference in New Issue