bug fix
This commit is contained in:
parent
be926e29bd
commit
68d4a44f09
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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')"
|
||||||
|
|
|
@ -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());
|
||||||
|
|
||||||
|
|
|
@ -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) => {
|
||||||
let data = JSON.parse(response.data);
|
if (response.data) {
|
||||||
this.timeout = data.timeout;
|
let data = JSON.parse(response.data);
|
||||||
this.statusCode = data.statusCode;
|
this.timeout = data.timeout || 10;
|
||||||
this.domains = data.domains;
|
this.statusCode = data.statusCode || [302];
|
||||||
this.params = data.params;
|
this.domains = data.domains || [];
|
||||||
|
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);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -115,7 +115,7 @@
|
||||||
methods: {
|
methods: {
|
||||||
convertProperty() {
|
convertProperty() {
|
||||||
/// todo:下面4个属性是jmeter ConcurrencyThreadGroup plugin的属性,这种硬编码不太好吧,在哪能转换这种属性?
|
/// todo:下面4个属性是jmeter 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},
|
||||||
|
|
Loading…
Reference in New Issue