Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
54f025e6a2
|
@ -52,10 +52,12 @@
|
||||||
|
|
||||||
<ms-api-report-dialog :test-id="id" ref="reportDialog"/>
|
<ms-api-report-dialog :test-id="id" ref="reportDialog"/>
|
||||||
|
|
||||||
<ms-schedule-config :schedule="test.schedule" :is-read-only="isReadOnly" :save="saveCronExpression" @scheduleChange="saveSchedule" :check-open="checkScheduleEdit"/>
|
<ms-schedule-config :schedule="test.schedule" :is-read-only="isReadOnly" :save="saveCronExpression"
|
||||||
|
@scheduleChange="saveSchedule" :check-open="checkScheduleEdit"/>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-header>
|
</el-header>
|
||||||
<ms-api-scenario-config :debug-report-id="debugReportId" @runDebug="runDebug" :is-read-only="isReadOnly" :scenarios="test.scenarioDefinition" :project-id="test.projectId" ref="config"/>
|
<ms-api-scenario-config :debug-report-id="debugReportId" @runDebug="runDebug" :is-read-only="isReadOnly"
|
||||||
|
:scenarios="test.scenarioDefinition" :project-id="test.projectId" ref="config"/>
|
||||||
</el-container>
|
</el-container>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
|
@ -71,6 +73,7 @@
|
||||||
import MsScheduleConfig from "../../common/components/MsScheduleConfig";
|
import MsScheduleConfig from "../../common/components/MsScheduleConfig";
|
||||||
import ApiImport from "./components/import/ApiImport";
|
import ApiImport from "./components/import/ApiImport";
|
||||||
import {getUUID} from "../../../../common/js/utils";
|
import {getUUID} from "../../../../common/js/utils";
|
||||||
|
import {ApiEvent, LIST_CHANGE} from "@/business/components/common/head/ListEvent";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsApiTestConfig",
|
name: "MsApiTestConfig",
|
||||||
|
@ -169,6 +172,8 @@
|
||||||
path: '/api/test/edit?id=' + this.test.id
|
path: '/api/test/edit?id=' + this.test.id
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 发送广播,刷新 head 上的最新列表
|
||||||
|
ApiEvent.$emit(LIST_CHANGE);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
runTest() {
|
runTest() {
|
||||||
|
@ -185,6 +190,8 @@
|
||||||
this.save(() => {
|
this.save(() => {
|
||||||
this.$success(this.$t('commons.save_success'));
|
this.$success(this.$t('commons.save_success'));
|
||||||
this.runTest();
|
this.runTest();
|
||||||
|
// 发送广播,刷新 head 上的最新列表
|
||||||
|
ApiEvent.$emit(LIST_CHANGE);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getBodyUploadFiles() {
|
getBodyUploadFiles() {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<el-col :span="4" class="script-index">
|
<el-col :span="4" class="script-index">
|
||||||
<div class="template-title">{{$t('api_test.request.processor.code_template')}}</div>
|
<div class="template-title">{{$t('api_test.request.processor.code_template')}}</div>
|
||||||
<div v-for="(template, index) in codeTemplates" :key="index" class="code-template">
|
<div v-for="(template, index) in codeTemplates" :key="index" class="code-template">
|
||||||
<el-link @click="addTemplate(template)">{{template.title}}</el-link>
|
<el-link :disabled="template.disabled" @click="addTemplate(template)">{{template.title}}</el-link>
|
||||||
</div>
|
</div>
|
||||||
<div class="document-url">
|
<div class="document-url">
|
||||||
<el-link href="https://jmeter.apache.org/usermanual/component_reference.html#BeanShell_PostProcessor" type="primary">{{$t('commons.reference_documentation')}}</el-link>
|
<el-link href="https://jmeter.apache.org/usermanual/component_reference.html#BeanShell_PostProcessor" type="primary">{{$t('commons.reference_documentation')}}</el-link>
|
||||||
|
@ -29,23 +29,26 @@
|
||||||
codeTemplates: [
|
codeTemplates: [
|
||||||
{
|
{
|
||||||
title: this.$t('api_test.request.processor.code_template_get_variable'),
|
title: this.$t('api_test.request.processor.code_template_get_variable'),
|
||||||
value: 'vars.get("variable_name");'
|
value: 'vars.get("variable_name");',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('api_test.request.processor.code_template_set_variable'),
|
title: this.$t('api_test.request.processor.code_template_set_variable'),
|
||||||
value: 'vars.put("variable_name", "variable_value");'
|
value: 'vars.put("variable_name", "variable_value");',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('api_test.request.processor.code_template_get_response_header'),
|
title: this.$t('api_test.request.processor.code_template_get_response_header'),
|
||||||
value: 'prev.getResponseHeaders();'
|
value: 'prev.getResponseHeaders();',
|
||||||
|
disabled: this.isPreProcessor
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('api_test.request.processor.code_template_get_response_code'),
|
title: this.$t('api_test.request.processor.code_template_get_response_code'),
|
||||||
value: 'prev.getResponseCode();'
|
value: 'prev.getResponseCode();',
|
||||||
|
disabled: this.isPreProcessor
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('api_test.request.processor.code_template_get_response_result'),
|
title: this.$t('api_test.request.processor.code_template_get_response_result'),
|
||||||
value: 'prev.getResponseDataAsString();'
|
value: 'prev.getResponseDataAsString();',
|
||||||
|
disabled: this.isPreProcessor
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
isCodeEditAlive: true
|
isCodeEditAlive: true
|
||||||
|
@ -61,6 +64,10 @@
|
||||||
},
|
},
|
||||||
beanShellProcessor: {
|
beanShellProcessor: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
},
|
||||||
|
isPreProcessor: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
<ms-api-extract :is-read-only="isReadOnly" :extract="request.extract"/>
|
<ms-api-extract :is-read-only="isReadOnly" :extract="request.extract"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane :label="$t('api_test.request.processor.pre_exec_script')" name="beanShellPreProcessor">
|
<el-tab-pane :label="$t('api_test.request.processor.pre_exec_script')" name="beanShellPreProcessor">
|
||||||
<ms-bean-shell-processor :is-read-only="isReadOnly" :bean-shell-processor="request.beanShellPreProcessor"/>
|
<ms-bean-shell-processor :is-pre-processor="true" :is-read-only="isReadOnly" :bean-shell-processor="request.beanShellPreProcessor"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane :label="$t('api_test.request.processor.post_exec_script')" name="beanShellPostProcessor">
|
<el-tab-pane :label="$t('api_test.request.processor.post_exec_script')" name="beanShellPostProcessor">
|
||||||
<ms-bean-shell-processor :is-read-only="isReadOnly" :bean-shell-processor="request.beanShellPostProcessor"/>
|
<ms-bean-shell-processor :is-read-only="isReadOnly" :bean-shell-processor="request.beanShellPostProcessor"/>
|
||||||
|
|
|
@ -60,6 +60,7 @@ import MsContainer from "../../common/components/MsContainer";
|
||||||
import MsMainContainer from "../../common/components/MsMainContainer";
|
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||||
import {checkoutTestManagerOrTestUser} from "../../../../common/js/utils";
|
import {checkoutTestManagerOrTestUser} from "../../../../common/js/utils";
|
||||||
import MsScheduleConfig from "../../common/components/MsScheduleConfig";
|
import MsScheduleConfig from "../../common/components/MsScheduleConfig";
|
||||||
|
import {LIST_CHANGE, PerformanceEvent} from "@/business/components/common/head/ListEvent";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "EditPerformanceTestPlan",
|
name: "EditPerformanceTestPlan",
|
||||||
|
@ -172,6 +173,8 @@ export default {
|
||||||
this.$success(this.$t('commons.save_success'));
|
this.$success(this.$t('commons.save_success'));
|
||||||
this.$refs.advancedConfig.cancelAllEdit();
|
this.$refs.advancedConfig.cancelAllEdit();
|
||||||
this.$router.push({path: '/performance/test/all'})
|
this.$router.push({path: '/performance/test/all'})
|
||||||
|
// 发送广播,刷新 head 上的最新列表
|
||||||
|
PerformanceEvent.$emit(LIST_CHANGE);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
saveAndRun() {
|
saveAndRun() {
|
||||||
|
@ -187,6 +190,8 @@ export default {
|
||||||
this.result = this.$post(this.runPath, {id: this.testPlan.id, triggerMode: 'MANUAL'}, (response) => {
|
this.result = this.$post(this.runPath, {id: this.testPlan.id, triggerMode: 'MANUAL'}, (response) => {
|
||||||
let reportId = response.data;
|
let reportId = response.data;
|
||||||
this.$router.push({path: '/performance/report/view/' + reportId})
|
this.$router.push({path: '/performance/report/view/' + reportId})
|
||||||
|
// 发送广播,刷新 head 上的最新列表
|
||||||
|
PerformanceEvent.$emit(LIST_CHANGE);
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -222,9 +222,10 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import {WORKSPACE_ID, TokenKey} from '../../../../../common/js/constants';
|
import {TokenKey, WORKSPACE_ID} from '../../../../../common/js/constants';
|
||||||
import MsDialogFooter from '../../../common/components/MsDialogFooter'
|
import MsDialogFooter from '../../../common/components/MsDialogFooter'
|
||||||
import {listenGoBack, removeGoBackListener, removeListenGoBack} from "../../../../../common/js/utils";
|
import {listenGoBack, removeGoBackListener} from "../../../../../common/js/utils";
|
||||||
|
import {LIST_CHANGE, TrackEvent} from "@/business/components/common/head/ListEvent";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestCaseEdit",
|
name: "TestCaseEdit",
|
||||||
|
@ -386,6 +387,8 @@
|
||||||
}
|
}
|
||||||
this.dialogFormVisible = false;
|
this.dialogFormVisible = false;
|
||||||
this.$emit("refresh");
|
this.$emit("refresh");
|
||||||
|
// 发送广播,刷新 head 上的最新列表
|
||||||
|
TrackEvent.$emit(LIST_CHANGE);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -108,7 +108,6 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
handleDragEnd(draggingNode, dropNode, dropType, ev) {
|
handleDragEnd(draggingNode, dropNode, dropType, ev) {
|
||||||
let param = this.buildParam(draggingNode, dropNode, dropType);
|
let param = this.buildParam(draggingNode, dropNode, dropType);
|
||||||
console.log(this.treeNodes);
|
|
||||||
this.$post("/case/node/drag", param, () => {
|
this.$post("/case/node/drag", param, () => {
|
||||||
draggingNode.data.level = param.level;
|
draggingNode.data.level = param.level;
|
||||||
this.refreshTable();
|
this.refreshTable();
|
||||||
|
|
|
@ -113,6 +113,7 @@
|
||||||
import {WORKSPACE_ID} from '../../../../../common/js/constants';
|
import {WORKSPACE_ID} from '../../../../../common/js/constants';
|
||||||
import TestPlanStatusButton from "../common/TestPlanStatusButton";
|
import TestPlanStatusButton from "../common/TestPlanStatusButton";
|
||||||
import {listenGoBack, removeGoBackListener} from "../../../../../common/js/utils";
|
import {listenGoBack, removeGoBackListener} from "../../../../../common/js/utils";
|
||||||
|
import {LIST_CHANGE, TrackEvent} from "@/business/components/common/head/ListEvent";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestPlanEdit",
|
name: "TestPlanEdit",
|
||||||
|
@ -174,6 +175,8 @@
|
||||||
this.$success(this.$t('commons.save_success'));
|
this.$success(this.$t('commons.save_success'));
|
||||||
this.dialogFormVisible = false;
|
this.dialogFormVisible = false;
|
||||||
this.$emit("refresh");
|
this.$emit("refresh");
|
||||||
|
// 发送广播,刷新 head 上的最新列表
|
||||||
|
TrackEvent.$emit(LIST_CHANGE);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue