Merge branch 'v1.8'
This commit is contained in:
commit
c02f437661
|
@ -163,7 +163,11 @@ public class MsHTTPSamplerProxy extends MsTestElement {
|
||||||
sampler.setProtocol(urlObject.getProtocol());
|
sampler.setProtocol(urlObject.getProtocol());
|
||||||
sampler.setPath(urlObject.getPath());
|
sampler.setPath(urlObject.getPath());
|
||||||
} else {
|
} else {
|
||||||
sampler.setDomain(config.getConfig().get(this.getProjectId()).getHttpConfig().getDomain());
|
String configStr = config.getConfig().get(this.getProjectId()).getHttpConfig().getSocket();
|
||||||
|
sampler.setDomain(configStr);
|
||||||
|
if (config.getConfig().get(this.getProjectId()).getHttpConfig().getPort() > 0) {
|
||||||
|
sampler.setDomain(config.getConfig().get(this.getProjectId()).getHttpConfig().getDomain());
|
||||||
|
}
|
||||||
sampler.setPort(config.getConfig().get(this.getProjectId()).getHttpConfig().getPort());
|
sampler.setPort(config.getConfig().get(this.getProjectId()).getHttpConfig().getPort());
|
||||||
sampler.setProtocol(config.getConfig().get(this.getProjectId()).getHttpConfig().getProtocol());
|
sampler.setProtocol(config.getConfig().get(this.getProjectId()).getHttpConfig().getProtocol());
|
||||||
sampler.setPath(this.getPath());
|
sampler.setPath(this.getPath());
|
||||||
|
|
|
@ -241,7 +241,7 @@ public class ApiAutomationService {
|
||||||
} else {
|
} else {
|
||||||
scenario.setUserId(request.getUserId());
|
scenario.setUserId(request.getUserId());
|
||||||
}
|
}
|
||||||
if (StringUtils.isEmpty(request.getApiScenarioModuleId()) || StringUtils.isEmpty(request.getModulePath()) || "default-module".equals(request.getApiScenarioModuleId())) {
|
if (StringUtils.isEmpty(request.getApiScenarioModuleId()) || "default-module".equals(request.getApiScenarioModuleId())) {
|
||||||
ApiScenarioModuleExample example = new ApiScenarioModuleExample();
|
ApiScenarioModuleExample example = new ApiScenarioModuleExample();
|
||||||
example.createCriteria().andProjectIdEqualTo(request.getProjectId()).andNameEqualTo("默认模块");
|
example.createCriteria().andProjectIdEqualTo(request.getProjectId()).andNameEqualTo("默认模块");
|
||||||
List<ApiScenarioModule> modules = apiScenarioModuleMapper.selectByExample(example);
|
List<ApiScenarioModule> modules = apiScenarioModuleMapper.selectByExample(example);
|
||||||
|
|
|
@ -264,7 +264,7 @@ public class ApiDefinitionService {
|
||||||
test.setEnvironmentId(request.getEnvironmentId());
|
test.setEnvironmentId(request.getEnvironmentId());
|
||||||
test.setUserId(request.getUserId());
|
test.setUserId(request.getUserId());
|
||||||
test.setTags(request.getTags());
|
test.setTags(request.getTags());
|
||||||
if (StringUtils.isEmpty(request.getModulePath()) || StringUtils.isEmpty(request.getModuleId()) || "default-module".equals(request.getModuleId())) {
|
if (StringUtils.isEmpty(request.getModuleId()) || "default-module".equals(request.getModuleId())) {
|
||||||
ApiModuleExample example = new ApiModuleExample();
|
ApiModuleExample example = new ApiModuleExample();
|
||||||
example.createCriteria().andProjectIdEqualTo(test.getProjectId()).andProtocolEqualTo(test.getProtocol()).andNameEqualTo("默认模块");
|
example.createCriteria().andProjectIdEqualTo(test.getProjectId()).andProtocolEqualTo(test.getProtocol()).andNameEqualTo("默认模块");
|
||||||
List<ApiModule> modules = apiModuleMapper.selectByExample(example);
|
List<ApiModule> modules = apiModuleMapper.selectByExample(example);
|
||||||
|
@ -297,7 +297,7 @@ public class ApiDefinitionService {
|
||||||
test.setStatus(APITestStatus.Underway.name());
|
test.setStatus(APITestStatus.Underway.name());
|
||||||
test.setModulePath(request.getModulePath());
|
test.setModulePath(request.getModulePath());
|
||||||
test.setModuleId(request.getModuleId());
|
test.setModuleId(request.getModuleId());
|
||||||
if (StringUtils.isEmpty(request.getModulePath()) || StringUtils.isEmpty(request.getModuleId()) || "default-module".equals(request.getModuleId())) {
|
if (StringUtils.isEmpty(request.getModuleId()) || "default-module".equals(request.getModuleId())) {
|
||||||
ApiModuleExample example = new ApiModuleExample();
|
ApiModuleExample example = new ApiModuleExample();
|
||||||
example.createCriteria().andProjectIdEqualTo(test.getProjectId()).andProtocolEqualTo(test.getProtocol()).andNameEqualTo("默认模块");
|
example.createCriteria().andProjectIdEqualTo(test.getProjectId()).andProtocolEqualTo(test.getProtocol()).andNameEqualTo("默认模块");
|
||||||
List<ApiModule> modules = apiModuleMapper.selectByExample(example);
|
List<ApiModule> modules = apiModuleMapper.selectByExample(example);
|
||||||
|
@ -616,7 +616,7 @@ public class ApiDefinitionService {
|
||||||
}
|
}
|
||||||
for (int i = 0; i < data.size(); i++) {
|
for (int i = 0; i < data.size(); i++) {
|
||||||
ApiDefinitionWithBLOBs item = data.get(i);
|
ApiDefinitionWithBLOBs item = data.get(i);
|
||||||
if (StringUtils.isEmpty(item.getModuleId()) || StringUtils.isEmpty(item.getModulePath()) || "default-module".equals(item.getModuleId())) {
|
if (StringUtils.isEmpty(item.getModuleId()) || "default-module".equals(item.getModuleId())) {
|
||||||
ApiModuleExample example = new ApiModuleExample();
|
ApiModuleExample example = new ApiModuleExample();
|
||||||
example.createCriteria().andProjectIdEqualTo(item.getProjectId()).andProtocolEqualTo(item.getProtocol()).andNameEqualTo("默认模块");
|
example.createCriteria().andProjectIdEqualTo(item.getProjectId()).andProtocolEqualTo(item.getProtocol()).andNameEqualTo("默认模块");
|
||||||
List<ApiModule> modules = apiModuleMapper.selectByExample(example);
|
List<ApiModule> modules = apiModuleMapper.selectByExample(example);
|
||||||
|
|
|
@ -93,7 +93,7 @@ public class TestCaseService {
|
||||||
TestCaseTestMapper testCaseTestMapper;
|
TestCaseTestMapper testCaseTestMapper;
|
||||||
|
|
||||||
private void setNode(TestCaseWithBLOBs testCase){
|
private void setNode(TestCaseWithBLOBs testCase){
|
||||||
if (StringUtils.isEmpty(testCase.getNodeId()) || StringUtils.isEmpty(testCase.getNodePath()) || "default-module".equals(testCase.getNodeId())) {
|
if (StringUtils.isEmpty(testCase.getNodeId()) || "default-module".equals(testCase.getNodeId())) {
|
||||||
TestCaseNodeExample example = new TestCaseNodeExample();
|
TestCaseNodeExample example = new TestCaseNodeExample();
|
||||||
example.createCriteria().andProjectIdEqualTo(testCase.getProjectId()).andNameEqualTo("默认模块");
|
example.createCriteria().andProjectIdEqualTo(testCase.getProjectId()).andNameEqualTo("默认模块");
|
||||||
List<TestCaseNode> nodes = testCaseNodeMapper.selectByExample(example);
|
List<TestCaseNode> nodes = testCaseNodeMapper.selectByExample(example);
|
||||||
|
|
|
@ -732,6 +732,9 @@ export default {
|
||||||
// let ids = [row.id];
|
// let ids = [row.id];
|
||||||
let param = {};
|
let param = {};
|
||||||
this.buildBatchParam(param);
|
this.buildBatchParam(param);
|
||||||
|
if(param.ids && param.ids.length <=0){
|
||||||
|
param.ids =[row.id];
|
||||||
|
}
|
||||||
this.$post('/api/automation/removeToGcByBatch/', param, () => {
|
this.$post('/api/automation/removeToGcByBatch/', param, () => {
|
||||||
// this.$post('/api/automation/removeToGc/', ids, () => {
|
// this.$post('/api/automation/removeToGc/', ids, () => {
|
||||||
this.$success(this.$t('commons.delete_success'));
|
this.$success(this.$t('commons.delete_success'));
|
||||||
|
|
|
@ -100,7 +100,14 @@
|
||||||
<div class="ms-debug-div" @click="showAll">
|
<div class="ms-debug-div" @click="showAll">
|
||||||
<el-row style="margin: 5px">
|
<el-row style="margin: 5px">
|
||||||
<el-col :span="6" class="ms-col-one ms-font">
|
<el-col :span="6" class="ms-col-one ms-font">
|
||||||
{{ currentScenario.name === undefined || '' ? $t('api_test.scenario.name') : currentScenario.name }}
|
<el-tooltip placement="top" effect="light">
|
||||||
|
<template v-slot:content>
|
||||||
|
<div>{{ currentScenario.name }}</div>
|
||||||
|
</template>
|
||||||
|
<span class="scenario-name">
|
||||||
|
{{ currentScenario.name === undefined || '' ? $t('api_test.scenario.name') : currentScenario.name }}
|
||||||
|
</span>
|
||||||
|
</el-tooltip>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" class="ms-col-one ms-font">
|
<el-col :span="3" class="ms-col-one ms-font">
|
||||||
{{$t('api_test.automation.step_total')}}:{{scenarioDefinition.length}}
|
{{$t('api_test.automation.step_total')}}:{{scenarioDefinition.length}}
|
||||||
|
@ -447,7 +454,7 @@
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setModule(id,data) {
|
setModule(id, data) {
|
||||||
this.currentScenario.apiScenarioModuleId = id;
|
this.currentScenario.apiScenarioModuleId = id;
|
||||||
this.currentScenario.modulePath = data.path;
|
this.currentScenario.modulePath = data.path;
|
||||||
},
|
},
|
||||||
|
@ -1250,4 +1257,14 @@
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.scenario-name {
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 5px;
|
||||||
|
overflow-x: hidden;
|
||||||
|
padding-bottom: 0;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
vertical-align: middle;
|
||||||
|
white-space: nowrap;
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -454,18 +454,18 @@
|
||||||
item.tags = JSON.parse(item.tags);
|
item.tags = JSON.parse(item.tags);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// if (this.$refs.apiDefinitionTable) {
|
if (this.$refs.apiDefinitionTable) {
|
||||||
// setTimeout(() => {
|
setTimeout(() => {
|
||||||
// this.$refs.apiDefinitionTable.doLayout();
|
|
||||||
// this.result.loading = false;
|
|
||||||
// }, 500)
|
|
||||||
// }
|
|
||||||
// nexttick:表格加载完成之后触发。判断是否需要勾选行
|
|
||||||
this.$nextTick(function(){
|
|
||||||
if (this.$refs.apiDefinitionTable) {
|
|
||||||
this.$refs.apiDefinitionTable.doLayout();
|
this.$refs.apiDefinitionTable.doLayout();
|
||||||
this.result.loading = false;
|
this.result.loading = false;
|
||||||
}
|
}, 500)
|
||||||
|
}
|
||||||
|
// nexttick:表格加载完成之后触发。判断是否需要勾选行
|
||||||
|
this.$nextTick(function(){
|
||||||
|
// if (this.$refs.apiDefinitionTable) {
|
||||||
|
// this.$refs.apiDefinitionTable.doLayout();
|
||||||
|
// this.result.loading = false;
|
||||||
|
// }
|
||||||
this.checkTableRowIsSelect();
|
this.checkTableRowIsSelect();
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
|
@ -71,27 +71,27 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MsApiRequestForm from "../request/http/ApiHttpRequestForm";
|
import MsApiRequestForm from "../request/http/ApiHttpRequestForm";
|
||||||
import {getUUID} from "@/common/js/utils";
|
import {getUUID} from "@/common/js/utils";
|
||||||
import MsApiCaseList from "../case/ApiCaseList";
|
import MsApiCaseList from "../case/ApiCaseList";
|
||||||
import MsContainer from "../../../../common/components/MsContainer";
|
import MsContainer from "../../../../common/components/MsContainer";
|
||||||
import MsRequestResultTail from "../response/RequestResultTail";
|
import MsRequestResultTail from "../response/RequestResultTail";
|
||||||
import MsRun from "../Run";
|
import MsRun from "../Run";
|
||||||
import {REQ_METHOD} from "../../model/JsonData";
|
import {REQ_METHOD} from "../../model/JsonData";
|
||||||
import EnvironmentSelect from "../environment/EnvironmentSelect";
|
import EnvironmentSelect from "../environment/EnvironmentSelect";
|
||||||
import MsJmxStep from "../step/JmxStep";
|
import MsJmxStep from "../step/JmxStep";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RunTestHTTPPage",
|
name: "RunTestHTTPPage",
|
||||||
components: {
|
components: {
|
||||||
EnvironmentSelect,
|
EnvironmentSelect,
|
||||||
MsApiRequestForm,
|
MsApiRequestForm,
|
||||||
MsApiCaseList,
|
MsApiCaseList,
|
||||||
MsContainer,
|
MsContainer,
|
||||||
MsRequestResultTail,
|
MsRequestResultTail,
|
||||||
MsRun,
|
MsRun,
|
||||||
MsJmxStep
|
MsJmxStep
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
visible: false,
|
visible: false,
|
||||||
|
@ -134,6 +134,7 @@ export default {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.api.request.name = this.api.id;
|
this.api.request.name = this.api.id;
|
||||||
|
this.api.request.url = undefined;
|
||||||
this.api.request.useEnvironment = this.api.environmentId;
|
this.api.request.useEnvironment = this.api.environmentId;
|
||||||
this.api.protocol = this.currentProtocol;
|
this.api.protocol = this.currentProtocol;
|
||||||
this.runData = [];
|
this.runData = [];
|
||||||
|
|
|
@ -102,9 +102,9 @@ export default {
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
.active {
|
.active {
|
||||||
border: solid 1px #6d317c;
|
border: solid 1px #6d317c!important;
|
||||||
background-color: var(--primary_color);
|
background-color: var(--primary_color)!important;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.case-button {
|
.case-button {
|
||||||
|
|
|
@ -263,6 +263,8 @@ export default {
|
||||||
if (response.data.filter(p => p.id === this.resourcePool).length === 0) {
|
if (response.data.filter(p => p.id === this.resourcePool).length === 0) {
|
||||||
this.resourcePool = null;
|
this.resourcePool = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.resourcePoolChange();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getLoadConfig() {
|
getLoadConfig() {
|
||||||
|
@ -354,7 +356,7 @@ export default {
|
||||||
result[0].resources.forEach(resource => {
|
result[0].resources.forEach(resource => {
|
||||||
threadNumber += JSON.parse(resource.configuration).maxConcurrency;
|
threadNumber += JSON.parse(resource.configuration).maxConcurrency;
|
||||||
})
|
})
|
||||||
this.maxThreadNumbers = threadNumber;
|
this.$set(this, 'maxThreadNumbers', threadNumber);
|
||||||
this.threadGroups.forEach(tg => {
|
this.threadGroups.forEach(tg => {
|
||||||
if (tg.threadNumber > threadNumber) {
|
if (tg.threadNumber > threadNumber) {
|
||||||
this.$set(tg, "threadNumber", threadNumber);
|
this.$set(tg, "threadNumber", threadNumber);
|
||||||
|
|
Loading…
Reference in New Issue