Merge branch 'master' of https://github.com/metersphere/metersphere
This commit is contained in:
commit
255f0673cc
|
@ -82,7 +82,9 @@ public class MsTCPSampler extends MsTestElement {
|
||||||
samplerHashTree.add(tcpConfig());
|
samplerHashTree.add(tcpConfig());
|
||||||
tree.set(tcpSampler(config), samplerHashTree);
|
tree.set(tcpSampler(config), samplerHashTree);
|
||||||
setUserParameters(samplerHashTree);
|
setUserParameters(samplerHashTree);
|
||||||
samplerHashTree.add(tcpPreProcessor.getJSR223PreProcessor());
|
if (tcpPreProcessor != null) {
|
||||||
|
samplerHashTree.add(tcpPreProcessor.getJSR223PreProcessor());
|
||||||
|
}
|
||||||
if (CollectionUtils.isNotEmpty(hashTree)) {
|
if (CollectionUtils.isNotEmpty(hashTree)) {
|
||||||
hashTree.forEach(el -> {
|
hashTree.forEach(el -> {
|
||||||
el.toHashTree(samplerHashTree, el.getHashTree(), config);
|
el.toHashTree(samplerHashTree, el.getHashTree(), config);
|
||||||
|
|
|
@ -95,7 +95,7 @@ public class DockerTestEngine extends AbstractEngine {
|
||||||
env.put("BOOTSTRAP_SERVERS", kafkaProperties.getBootstrapServers());
|
env.put("BOOTSTRAP_SERVERS", kafkaProperties.getBootstrapServers());
|
||||||
env.put("LOG_TOPIC", kafkaProperties.getLog().getTopic());
|
env.put("LOG_TOPIC", kafkaProperties.getLog().getTopic());
|
||||||
env.put("RESOURCE_ID", resource.getId());
|
env.put("RESOURCE_ID", resource.getId());
|
||||||
env.put("THREAD_NUM", "" + threadNum);
|
env.put("THREAD_NUM", "0");// 传入0表示不用修改线程数
|
||||||
env.put("HEAP", jmeterProperties.getHeap());
|
env.put("HEAP", jmeterProperties.getHeap());
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,10 @@ public class JmeterFileService {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setThreadNum(LoadTestWithBLOBs t, Integer limit) {
|
private void setThreadNum(LoadTestWithBLOBs t, Integer limit) {
|
||||||
|
// 传入limit才去改这个值
|
||||||
|
if (limit <= 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
String loadConfiguration = t.getLoadConfiguration();
|
String loadConfiguration = t.getLoadConfiguration();
|
||||||
JSONArray jsonArray = JSON.parseArray(loadConfiguration);
|
JSONArray jsonArray = JSON.parseArray(loadConfiguration);
|
||||||
for (int i = 0; i < jsonArray.size(); i++) {
|
for (int i = 0; i < jsonArray.size(); i++) {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit ed891ee7503cc1ca4679b4779a5c12e2ffee986d
|
Subproject commit bb9ad600f10ff2dd9c3d364a7b30b1926dc2a74f
|
|
@ -40,8 +40,10 @@
|
||||||
|
|
||||||
<el-collapse-transition>
|
<el-collapse-transition>
|
||||||
<div v-if="data.active && showCollapse" :draggable="draggable">
|
<div v-if="data.active && showCollapse" :draggable="draggable">
|
||||||
<el-divider></el-divider>
|
<fieldset :disabled="data.disabled" style="border: 0px">
|
||||||
<slot></slot>
|
<el-divider></el-divider>
|
||||||
|
<slot></slot>
|
||||||
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</el-collapse-transition>
|
</el-collapse-transition>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
|
@ -190,6 +190,7 @@
|
||||||
}
|
}
|
||||||
this.request.requestResult = requestResult;
|
this.request.requestResult = requestResult;
|
||||||
this.request.id = response.data.id;
|
this.request.id = response.data.id;
|
||||||
|
this.request.disabled = true;
|
||||||
this.reload();
|
this.reload();
|
||||||
this.sort();
|
this.sort();
|
||||||
} else {
|
} else {
|
||||||
|
@ -200,6 +201,7 @@
|
||||||
},
|
},
|
||||||
recursiveSorting(arr) {
|
recursiveSorting(arr) {
|
||||||
for (let i in arr) {
|
for (let i in arr) {
|
||||||
|
arr[i].disabled = true;
|
||||||
arr[i].index = Number(i) + 1;
|
arr[i].index = Number(i) + 1;
|
||||||
if (arr[i].hashTree != undefined && arr[i].hashTree.length > 0) {
|
if (arr[i].hashTree != undefined && arr[i].hashTree.length > 0) {
|
||||||
this.recursiveSorting(arr[i].hashTree);
|
this.recursiveSorting(arr[i].hashTree);
|
||||||
|
@ -208,6 +210,7 @@
|
||||||
},
|
},
|
||||||
sort() {
|
sort() {
|
||||||
for (let i in this.request.hashTree) {
|
for (let i in this.request.hashTree) {
|
||||||
|
this.request.hashTree[i].disabled = true;
|
||||||
this.request.hashTree[i].index = Number(i) + 1;
|
this.request.hashTree[i].index = Number(i) + 1;
|
||||||
if (this.request.hashTree[i].hashTree != undefined && this.request.hashTree[i].hashTree.length > 0) {
|
if (this.request.hashTree[i].hashTree != undefined && this.request.hashTree[i].hashTree.length > 0) {
|
||||||
this.recursiveSorting(this.request.hashTree[i].hashTree);
|
this.recursiveSorting(this.request.hashTree[i].hashTree);
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
:data="scenario"
|
:data="scenario"
|
||||||
:show-collapse="false"
|
:show-collapse="false"
|
||||||
:is-show-name-input="!isDeletedOrRef"
|
:is-show-name-input="!isDeletedOrRef"
|
||||||
|
:is-disabled="true"
|
||||||
color="#606266"
|
color="#606266"
|
||||||
background-color="#F4F4F5"
|
background-color="#F4F4F5"
|
||||||
:title="$t('api_test.automation.scenario_import')">
|
:title="$t('api_test.automation.scenario_import')">
|
||||||
|
@ -45,6 +46,10 @@
|
||||||
if (response.data.scenarioDefinition) {
|
if (response.data.scenarioDefinition) {
|
||||||
this.scenario.hashTree = JSON.parse(response.data.scenarioDefinition).hashTree;
|
this.scenario.hashTree = JSON.parse(response.data.scenarioDefinition).hashTree;
|
||||||
}
|
}
|
||||||
|
if (this.scenario.hashTree) {
|
||||||
|
this.setDisabled(this.scenario.hashTree);
|
||||||
|
}
|
||||||
|
this.scenario.disabled = true;
|
||||||
this.scenario.name = response.data.name;
|
this.scenario.name = response.data.name;
|
||||||
this.$emit('refReload');
|
this.$emit('refReload');
|
||||||
} else {
|
} else {
|
||||||
|
@ -85,6 +90,22 @@
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
recursive(arr) {
|
||||||
|
for (let i in arr) {
|
||||||
|
arr[i].disabled = true;
|
||||||
|
if (arr[i].hashTree != undefined && arr[i].hashTree.length > 0) {
|
||||||
|
this.recursive(arr[i].hashTree);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
setDisabled(scenarioDefinition) {
|
||||||
|
for (let i in scenarioDefinition) {
|
||||||
|
scenarioDefinition[i].disabled = true;
|
||||||
|
if (scenarioDefinition[i].hashTree != undefined && scenarioDefinition[i].hashTree.length > 0) {
|
||||||
|
this.recursive(scenarioDefinition[i].hashTree);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 6d6ed5226849337876ecf55312aa6b5f13ba6472
|
Subproject commit 416645a24d941eb9727c07c19be70422c2e66cc7
|
Loading…
Reference in New Issue