bug fix
This commit is contained in:
parent
be926e29bd
commit
68d4a44f09
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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')"
|
||||
|
|
|
@ -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());
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
methods: {
|
||||
convertProperty() {
|
||||
/// todo:下面4个属性是jmeter ConcurrencyThreadGroup plugin的属性,这种硬编码不太好吧,在哪能转换这种属性?
|
||||
this.testPlan.loadConfigurationObj = [
|
||||
return [
|
||||
{key: "TargetLevel", value: this.threadNumber},
|
||||
{key: "RampUp", value: this.rampUpTime},
|
||||
{key: "Steps", value: this.step},
|
||||
|
|
Loading…
Reference in New Issue