This commit is contained in:
Captain.B 2020-02-28 18:57:20 +08:00
parent be926e29bd
commit 68d4a44f09
5 changed files with 14 additions and 17 deletions

View File

@ -78,6 +78,7 @@ public class LoadTestService {
loadTest.setScenarioDefinition("todo");
loadTest.setDescription("todo");
loadTest.setLoadConfiguration(request.getLoadConfiguration());
loadTest.setAdvancedConfiguration(request.getAdvancedConfiguration());
loadTestMapper.insert(loadTest);
return loadTest;
}

View File

@ -14,10 +14,6 @@
</el-row>
</div>
<el-table :data="tableData" class="test-content">
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column
prop="name"
:label="$t('commons.name')"

View File

@ -148,9 +148,8 @@
if (!this.testPlan.file.id) {
formData.append("file", this.testPlan.file);
}
if (this.testPlan.loadConfigurationObj) {
this.testPlan.loadConfiguration = JSON.stringify(this.testPlan.loadConfigurationObj);
}
//
this.testPlan.loadConfiguration = JSON.stringify(this.$refs.pressureConfig.convertProperty());
//
this.testPlan.advancedConfiguration = JSON.stringify(this.$refs.advancedConfig.configurations());

View File

@ -195,15 +195,16 @@
mounted() {
let testId = this.$route.path.split('/')[2];
if (testId) {
this.$get('/testplan/get-advanced-config/' + testId, response => {
let data = JSON.parse(response.data);
this.timeout = data.timeout;
this.statusCode = data.statusCode;
this.domains = data.domains;
this.params = data.params;
this.domains.forEach(d => d.edit = false);
this.params.forEach(d => d.edit = false);
this.$get('/testplan/get-advanced-config/' + testId, (response) => {
if (response.data) {
let data = JSON.parse(response.data);
this.timeout = data.timeout || 10;
this.statusCode = data.statusCode || [302];
this.domains = data.domains || [];
this.params = data.params || [];
this.domains.forEach(d => d.edit = false);
this.params.forEach(d => d.edit = false);
}
});
}
},

View File

@ -115,7 +115,7 @@
methods: {
convertProperty() {
/// todo4jmeter ConcurrencyThreadGroup plugin
this.testPlan.loadConfigurationObj = [
return [
{key: "TargetLevel", value: this.threadNumber},
{key: "RampUp", value: this.rampUpTime},
{key: "Steps", value: this.step},