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.setPath(urlObject.getPath());
|
||||
} 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.setProtocol(config.getConfig().get(this.getProjectId()).getHttpConfig().getProtocol());
|
||||
sampler.setPath(this.getPath());
|
||||
|
|
|
@ -241,7 +241,7 @@ public class ApiAutomationService {
|
|||
} else {
|
||||
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();
|
||||
example.createCriteria().andProjectIdEqualTo(request.getProjectId()).andNameEqualTo("默认模块");
|
||||
List<ApiScenarioModule> modules = apiScenarioModuleMapper.selectByExample(example);
|
||||
|
|
|
@ -264,7 +264,7 @@ public class ApiDefinitionService {
|
|||
test.setEnvironmentId(request.getEnvironmentId());
|
||||
test.setUserId(request.getUserId());
|
||||
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();
|
||||
example.createCriteria().andProjectIdEqualTo(test.getProjectId()).andProtocolEqualTo(test.getProtocol()).andNameEqualTo("默认模块");
|
||||
List<ApiModule> modules = apiModuleMapper.selectByExample(example);
|
||||
|
@ -297,7 +297,7 @@ public class ApiDefinitionService {
|
|||
test.setStatus(APITestStatus.Underway.name());
|
||||
test.setModulePath(request.getModulePath());
|
||||
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();
|
||||
example.createCriteria().andProjectIdEqualTo(test.getProjectId()).andProtocolEqualTo(test.getProtocol()).andNameEqualTo("默认模块");
|
||||
List<ApiModule> modules = apiModuleMapper.selectByExample(example);
|
||||
|
@ -616,7 +616,7 @@ public class ApiDefinitionService {
|
|||
}
|
||||
for (int i = 0; i < data.size(); 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();
|
||||
example.createCriteria().andProjectIdEqualTo(item.getProjectId()).andProtocolEqualTo(item.getProtocol()).andNameEqualTo("默认模块");
|
||||
List<ApiModule> modules = apiModuleMapper.selectByExample(example);
|
||||
|
|
|
@ -93,7 +93,7 @@ public class TestCaseService {
|
|||
TestCaseTestMapper testCaseTestMapper;
|
||||
|
||||
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();
|
||||
example.createCriteria().andProjectIdEqualTo(testCase.getProjectId()).andNameEqualTo("默认模块");
|
||||
List<TestCaseNode> nodes = testCaseNodeMapper.selectByExample(example);
|
||||
|
|
|
@ -732,6 +732,9 @@ export default {
|
|||
// let ids = [row.id];
|
||||
let 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/removeToGc/', ids, () => {
|
||||
this.$success(this.$t('commons.delete_success'));
|
||||
|
|
|
@ -100,7 +100,14 @@
|
|||
<div class="ms-debug-div" @click="showAll">
|
||||
<el-row style="margin: 5px">
|
||||
<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 :span="3" class="ms-col-one ms-font">
|
||||
{{$t('api_test.automation.step_total')}}:{{scenarioDefinition.length}}
|
||||
|
@ -447,7 +454,7 @@
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
setModule(id,data) {
|
||||
setModule(id, data) {
|
||||
this.currentScenario.apiScenarioModuleId = id;
|
||||
this.currentScenario.modulePath = data.path;
|
||||
},
|
||||
|
@ -1250,4 +1257,14 @@
|
|||
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>
|
||||
|
|
|
@ -454,18 +454,18 @@
|
|||
item.tags = JSON.parse(item.tags);
|
||||
}
|
||||
})
|
||||
// if (this.$refs.apiDefinitionTable) {
|
||||
// setTimeout(() => {
|
||||
// this.$refs.apiDefinitionTable.doLayout();
|
||||
// this.result.loading = false;
|
||||
// }, 500)
|
||||
// }
|
||||
// nexttick:表格加载完成之后触发。判断是否需要勾选行
|
||||
this.$nextTick(function(){
|
||||
if (this.$refs.apiDefinitionTable) {
|
||||
if (this.$refs.apiDefinitionTable) {
|
||||
setTimeout(() => {
|
||||
this.$refs.apiDefinitionTable.doLayout();
|
||||
this.result.loading = false;
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
// nexttick:表格加载完成之后触发。判断是否需要勾选行
|
||||
this.$nextTick(function(){
|
||||
// if (this.$refs.apiDefinitionTable) {
|
||||
// this.$refs.apiDefinitionTable.doLayout();
|
||||
// this.result.loading = false;
|
||||
// }
|
||||
this.checkTableRowIsSelect();
|
||||
})
|
||||
});
|
||||
|
|
|
@ -71,27 +71,27 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import MsApiRequestForm from "../request/http/ApiHttpRequestForm";
|
||||
import {getUUID} from "@/common/js/utils";
|
||||
import MsApiCaseList from "../case/ApiCaseList";
|
||||
import MsContainer from "../../../../common/components/MsContainer";
|
||||
import MsRequestResultTail from "../response/RequestResultTail";
|
||||
import MsRun from "../Run";
|
||||
import {REQ_METHOD} from "../../model/JsonData";
|
||||
import EnvironmentSelect from "../environment/EnvironmentSelect";
|
||||
import MsJmxStep from "../step/JmxStep";
|
||||
import MsApiRequestForm from "../request/http/ApiHttpRequestForm";
|
||||
import {getUUID} from "@/common/js/utils";
|
||||
import MsApiCaseList from "../case/ApiCaseList";
|
||||
import MsContainer from "../../../../common/components/MsContainer";
|
||||
import MsRequestResultTail from "../response/RequestResultTail";
|
||||
import MsRun from "../Run";
|
||||
import {REQ_METHOD} from "../../model/JsonData";
|
||||
import EnvironmentSelect from "../environment/EnvironmentSelect";
|
||||
import MsJmxStep from "../step/JmxStep";
|
||||
|
||||
export default {
|
||||
name: "RunTestHTTPPage",
|
||||
components: {
|
||||
EnvironmentSelect,
|
||||
MsApiRequestForm,
|
||||
MsApiCaseList,
|
||||
MsContainer,
|
||||
MsRequestResultTail,
|
||||
MsRun,
|
||||
MsJmxStep
|
||||
},
|
||||
export default {
|
||||
name: "RunTestHTTPPage",
|
||||
components: {
|
||||
EnvironmentSelect,
|
||||
MsApiRequestForm,
|
||||
MsApiCaseList,
|
||||
MsContainer,
|
||||
MsRequestResultTail,
|
||||
MsRun,
|
||||
MsJmxStep
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
|
@ -134,6 +134,7 @@ export default {
|
|||
if (valid) {
|
||||
this.loading = true;
|
||||
this.api.request.name = this.api.id;
|
||||
this.api.request.url = undefined;
|
||||
this.api.request.useEnvironment = this.api.environmentId;
|
||||
this.api.protocol = this.currentProtocol;
|
||||
this.runData = [];
|
||||
|
|
|
@ -102,9 +102,9 @@ export default {
|
|||
<style scoped>
|
||||
|
||||
.active {
|
||||
border: solid 1px #6d317c;
|
||||
background-color: var(--primary_color);
|
||||
color: #FFFFFF;
|
||||
border: solid 1px #6d317c!important;
|
||||
background-color: var(--primary_color)!important;
|
||||
color: #FFFFFF!important;
|
||||
}
|
||||
|
||||
.case-button {
|
||||
|
|
|
@ -263,6 +263,8 @@ export default {
|
|||
if (response.data.filter(p => p.id === this.resourcePool).length === 0) {
|
||||
this.resourcePool = null;
|
||||
}
|
||||
|
||||
this.resourcePoolChange();
|
||||
})
|
||||
},
|
||||
getLoadConfig() {
|
||||
|
@ -354,7 +356,7 @@ export default {
|
|||
result[0].resources.forEach(resource => {
|
||||
threadNumber += JSON.parse(resource.configuration).maxConcurrency;
|
||||
})
|
||||
this.maxThreadNumbers = threadNumber;
|
||||
this.$set(this, 'maxThreadNumbers', threadNumber);
|
||||
this.threadGroups.forEach(tg => {
|
||||
if (tg.threadNumber > threadNumber) {
|
||||
this.$set(tg, "threadNumber", threadNumber);
|
||||
|
|
Loading…
Reference in New Issue