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.setScenarioDefinition("todo");
loadTest.setDescription("todo"); loadTest.setDescription("todo");
loadTest.setLoadConfiguration(request.getLoadConfiguration()); loadTest.setLoadConfiguration(request.getLoadConfiguration());
loadTest.setAdvancedConfiguration(request.getAdvancedConfiguration());
loadTestMapper.insert(loadTest); loadTestMapper.insert(loadTest);
return loadTest; return loadTest;
} }

View File

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

View File

@ -148,9 +148,8 @@
if (!this.testPlan.file.id) { if (!this.testPlan.file.id) {
formData.append("file", this.testPlan.file); 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()); this.testPlan.advancedConfiguration = JSON.stringify(this.$refs.advancedConfig.configurations());

View File

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

View File

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