Merge branch 'v1.7'
This commit is contained in:
commit
b41edd7c03
|
@ -196,6 +196,8 @@ public abstract class MsTestElement {
|
||||||
csvDataSet.setProperty("filename", BODY_FILE_DIR + "/" + item.getFiles().get(0).getId() + "_" + item.getFiles().get(0).getName());
|
csvDataSet.setProperty("filename", BODY_FILE_DIR + "/" + item.getFiles().get(0).getId() + "_" + item.getFiles().get(0).getName());
|
||||||
}
|
}
|
||||||
csvDataSet.setIgnoreFirstLine(false);
|
csvDataSet.setIgnoreFirstLine(false);
|
||||||
|
csvDataSet.setRecycle(true);
|
||||||
|
csvDataSet.setProperty("recycle", true);
|
||||||
csvDataSet.setProperty("delimiter", item.getDelimiter());
|
csvDataSet.setProperty("delimiter", item.getDelimiter());
|
||||||
csvDataSet.setComment(StringUtils.isEmpty(item.getDescription()) ? "" : item.getDescription());
|
csvDataSet.setComment(StringUtils.isEmpty(item.getDescription()) ? "" : item.getDescription());
|
||||||
tree.add(csvDataSet);
|
tree.add(csvDataSet);
|
||||||
|
|
|
@ -171,12 +171,16 @@ public class HistoricalDataUpgradeService {
|
||||||
element = new MsJDBCSampler();
|
element = new MsJDBCSampler();
|
||||||
SqlRequest request1 = (SqlRequest) request;
|
SqlRequest request1 = (SqlRequest) request;
|
||||||
BeanUtils.copyBean(element, request1);
|
BeanUtils.copyBean(element, request1);
|
||||||
|
|
||||||
EnvironmentDTO dto = environmentDTOMap.get(request1.getDataSource());
|
EnvironmentDTO dto = environmentDTOMap.get(request1.getDataSource());
|
||||||
if (dto != null) {
|
if (dto != null) {
|
||||||
((MsJDBCSampler) element).setEnvironmentId(dto.getEnvironmentId());
|
((MsJDBCSampler) element).setEnvironmentId(dto.getEnvironmentId());
|
||||||
((MsJDBCSampler) element).setDataSourceId(dto.getDatabaseConfig().getId());
|
((MsJDBCSampler) element).setDataSourceId(dto.getDatabaseConfig().getId());
|
||||||
((MsJDBCSampler) element).setDataSource(dto.getDatabaseConfig());
|
((MsJDBCSampler) element).setDataSource(dto.getDatabaseConfig());
|
||||||
}
|
}
|
||||||
|
if (CollectionUtils.isEmpty(request1.getVariables())) {
|
||||||
|
((MsJDBCSampler) element).setVariables(new ArrayList<>());
|
||||||
|
}
|
||||||
element.setType("JDBCSampler");
|
element.setType("JDBCSampler");
|
||||||
}
|
}
|
||||||
if (request instanceof TCPRequest) {
|
if (request instanceof TCPRequest) {
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
@edit="edit"
|
@edit="edit"
|
||||||
@drag="drag"
|
@drag="drag"
|
||||||
@remove="remove"
|
@remove="remove"
|
||||||
|
@refresh="list"
|
||||||
@nodeSelectEvent="nodeChange"
|
@nodeSelectEvent="nodeChange"
|
||||||
ref="nodeTree">
|
ref="nodeTree">
|
||||||
|
|
||||||
|
@ -34,14 +35,14 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import SelectMenu from "../../../track/common/SelectMenu";
|
import SelectMenu from "../../../track/common/SelectMenu";
|
||||||
import MsAddBasisScenario from "@/business/components/api/automation/scenario/AddBasisScenario";
|
import MsAddBasisScenario from "@/business/components/api/automation/scenario/AddBasisScenario";
|
||||||
import {getCurrentProjectID} from "@/common/js/utils";
|
import {getCurrentProjectID} from "@/common/js/utils";
|
||||||
import MsNodeTree from "../../../track/common/NodeTree";
|
import MsNodeTree from "../../../track/common/NodeTree";
|
||||||
import {buildNodePath} from "../../definition/model/NodeTree";
|
import {buildNodePath} from "../../definition/model/NodeTree";
|
||||||
import ModuleTrashButton from "../../definition/components/module/ModuleTrashButton";
|
import ModuleTrashButton from "../../definition/components/module/ModuleTrashButton";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MsApiScenarioModule',
|
name: 'MsApiScenarioModule',
|
||||||
components: {
|
components: {
|
||||||
ModuleTrashButton,
|
ModuleTrashButton,
|
||||||
|
|
|
@ -17,19 +17,19 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MsEditCompleteHttpApi from "./complete/EditCompleteHTTPApi";
|
import MsEditCompleteHttpApi from "./complete/EditCompleteHTTPApi";
|
||||||
import MsEditCompleteTcpApi from "./complete/EditCompleteTCPApi";
|
import MsEditCompleteTcpApi from "./complete/EditCompleteTCPApi";
|
||||||
import MsEditCompleteDubboApi from "./complete/EditCompleteDubboApi";
|
import MsEditCompleteDubboApi from "./complete/EditCompleteDubboApi";
|
||||||
import MsEditCompleteSqlApi from "./complete/EditCompleteSQLApi";
|
import MsEditCompleteSqlApi from "./complete/EditCompleteSQLApi";
|
||||||
|
|
||||||
import {ResponseFactory, Body} from "../model/ApiTestModel";
|
import {Body} from "../model/ApiTestModel";
|
||||||
import {getUUID, getCurrentProjectID} from "@/common/js/utils";
|
import {getUUID} from "@/common/js/utils";
|
||||||
import {createComponent, Request} from "./jmeter/components";
|
import {createComponent, Request} from "./jmeter/components";
|
||||||
import Sampler from "./jmeter/components/sampler/sampler";
|
import Sampler from "./jmeter/components/sampler/sampler";
|
||||||
import {WORKSPACE_ID} from '@/common/js/constants';
|
import {WORKSPACE_ID} from '@/common/js/constants';
|
||||||
import {handleCtrlSEvent} from "../../../../../common/js/utils";
|
import {handleCtrlSEvent} from "../../../../../common/js/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ApiConfig",
|
name: "ApiConfig",
|
||||||
components: {MsEditCompleteHttpApi, MsEditCompleteTcpApi, MsEditCompleteDubboApi, MsEditCompleteSqlApi},
|
components: {MsEditCompleteHttpApi, MsEditCompleteTcpApi, MsEditCompleteDubboApi, MsEditCompleteSqlApi},
|
||||||
data() {
|
data() {
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
@edit="edit"
|
@edit="edit"
|
||||||
@drag="drag"
|
@drag="drag"
|
||||||
@remove="remove"
|
@remove="remove"
|
||||||
|
@refresh="list"
|
||||||
@nodeSelectEvent="nodeChange"
|
@nodeSelectEvent="nodeChange"
|
||||||
ref="nodeTree">
|
ref="nodeTree">
|
||||||
|
|
||||||
|
@ -33,16 +34,16 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MsAddBasisApi from "../basis/AddBasisApi";
|
import MsAddBasisApi from "../basis/AddBasisApi";
|
||||||
import SelectMenu from "../../../../track/common/SelectMenu";
|
import SelectMenu from "../../../../track/common/SelectMenu";
|
||||||
import {OPTIONS} from "../../model/JsonData";
|
import {OPTIONS} from "../../model/JsonData";
|
||||||
import ApiImport from "../import/ApiImport";
|
import ApiImport from "../import/ApiImport";
|
||||||
import {getCurrentProjectID} from "@/common/js/utils";
|
import {getCurrentProjectID} from "@/common/js/utils";
|
||||||
import MsNodeTree from "../../../../track/common/NodeTree";
|
import MsNodeTree from "../../../../track/common/NodeTree";
|
||||||
import ApiModuleHeader from "./ApiModuleHeader";
|
import ApiModuleHeader from "./ApiModuleHeader";
|
||||||
import {buildNodePath} from "../../model/NodeTree";
|
import {buildNodePath} from "../../model/NodeTree";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MsApiModule',
|
name: 'MsApiModule',
|
||||||
components: {
|
components: {
|
||||||
ApiModuleHeader,
|
ApiModuleHeader,
|
||||||
|
|
|
@ -44,19 +44,19 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {downloadFile, getUUID} from "@/common/js/utils";
|
import {getUUID, uuid} 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 MsBottomContainer from "../BottomContainer";
|
import MsBottomContainer from "../BottomContainer";
|
||||||
import {parseEnvironment} from "../../model/EnvironmentModel";
|
import {parseEnvironment} from "../../model/EnvironmentModel";
|
||||||
import ApiEnvironmentConfig from "../environment/ApiEnvironmentConfig";
|
import ApiEnvironmentConfig from "../environment/ApiEnvironmentConfig";
|
||||||
import MsRequestResultTail from "../response/RequestResultTail";
|
import MsRequestResultTail from "../response/RequestResultTail";
|
||||||
import MsRun from "../Run";
|
import MsRun from "../Run";
|
||||||
import MsBasisParameters from "../request/dubbo/BasisParameters";
|
import MsBasisParameters from "../request/dubbo/BasisParameters";
|
||||||
import {REQ_METHOD} from "../../model/JsonData";
|
import {REQ_METHOD} from "../../model/JsonData";
|
||||||
import MsJmxStep from "../step/JmxStep";
|
import MsJmxStep from "../step/JmxStep";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RunTestDubboPage",
|
name: "RunTestDubboPage",
|
||||||
components: {
|
components: {
|
||||||
MsApiCaseList,
|
MsApiCaseList,
|
||||||
|
@ -161,12 +161,14 @@
|
||||||
},
|
},
|
||||||
saveAsApi() {
|
saveAsApi() {
|
||||||
let data = {};
|
let data = {};
|
||||||
|
this.api.request.id = uuid();
|
||||||
data.request = JSON.stringify(this.api.request);
|
data.request = JSON.stringify(this.api.request);
|
||||||
data.method = this.api.method;
|
data.method = this.api.method;
|
||||||
data.status = this.api.status;
|
data.status = this.api.status;
|
||||||
data.userId = this.api.userId;
|
data.userId = this.api.userId;
|
||||||
data.description = this.api.description;
|
data.description = this.api.description;
|
||||||
this.$emit('saveAsApi', data);
|
this.$emit('saveAsApi', data);
|
||||||
|
this.$emit('refresh');
|
||||||
},
|
},
|
||||||
updateApi() {
|
updateApi() {
|
||||||
let url = "/api/definition/update";
|
let url = "/api/definition/update";
|
||||||
|
|
|
@ -44,19 +44,19 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {downloadFile, getUUID} from "@/common/js/utils";
|
import {getUUID, uuid} 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 MsBottomContainer from "../BottomContainer";
|
import MsBottomContainer from "../BottomContainer";
|
||||||
import {parseEnvironment} from "../../model/EnvironmentModel";
|
import {parseEnvironment} from "../../model/EnvironmentModel";
|
||||||
import ApiEnvironmentConfig from "../environment/ApiEnvironmentConfig";
|
import ApiEnvironmentConfig from "../environment/ApiEnvironmentConfig";
|
||||||
import MsRequestResultTail from "../response/RequestResultTail";
|
import MsRequestResultTail from "../response/RequestResultTail";
|
||||||
import MsRun from "../Run";
|
import MsRun from "../Run";
|
||||||
import MsBasisParameters from "../request/database/BasisParameters";
|
import MsBasisParameters from "../request/database/BasisParameters";
|
||||||
import {REQ_METHOD} from "../../model/JsonData";
|
import {REQ_METHOD} from "../../model/JsonData";
|
||||||
import MsJmxStep from "../step/JmxStep";
|
import MsJmxStep from "../step/JmxStep";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RunTestSQLPage",
|
name: "RunTestSQLPage",
|
||||||
components: {
|
components: {
|
||||||
MsApiCaseList,
|
MsApiCaseList,
|
||||||
|
@ -160,12 +160,14 @@
|
||||||
},
|
},
|
||||||
saveAsApi() {
|
saveAsApi() {
|
||||||
let data = {};
|
let data = {};
|
||||||
|
this.api.request.id = uuid();
|
||||||
data.request = JSON.stringify(this.api.request);
|
data.request = JSON.stringify(this.api.request);
|
||||||
data.method = this.api.method;
|
data.method = this.api.method;
|
||||||
data.status = this.api.status;
|
data.status = this.api.status;
|
||||||
data.userId = this.api.userId;
|
data.userId = this.api.userId;
|
||||||
data.description = this.api.description;
|
data.description = this.api.description;
|
||||||
this.$emit('saveAsApi', data);
|
this.$emit('saveAsApi', data);
|
||||||
|
this.$emit('refresh');
|
||||||
},
|
},
|
||||||
updateApi() {
|
updateApi() {
|
||||||
let url = "/api/definition/update";
|
let url = "/api/definition/update";
|
||||||
|
@ -175,7 +177,7 @@
|
||||||
if (this.syncTabs.indexOf(this.api.id) === -1) {
|
if (this.syncTabs.indexOf(this.api.id) === -1) {
|
||||||
this.syncTabs.push(this.api.id);
|
this.syncTabs.push(this.api.id);
|
||||||
}
|
}
|
||||||
this.$emit('saveApi', this.api);
|
this.$emit('refresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
selectTestCase(item) {
|
selectTestCase(item) {
|
||||||
|
|
|
@ -54,19 +54,19 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MsApiRequestForm from "../request/http/ApiHttpRequestForm";
|
import MsApiRequestForm from "../request/http/ApiHttpRequestForm";
|
||||||
import {downloadFile, getUUID, getCurrentProjectID} from "@/common/js/utils";
|
import {getUUID, uuid} 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 MsBottomContainer from "../BottomContainer";
|
import MsBottomContainer from "../BottomContainer";
|
||||||
import MsRequestResultTail from "../response/RequestResultTail";
|
import MsRequestResultTail from "../response/RequestResultTail";
|
||||||
import MsRun from "../Run";
|
import MsRun from "../Run";
|
||||||
import MsBasisParameters from "../request/tcp/TcpBasisParameters";
|
import MsBasisParameters from "../request/tcp/TcpBasisParameters";
|
||||||
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: "RunTestTCPPage",
|
name: "RunTestTCPPage",
|
||||||
components: {
|
components: {
|
||||||
MsJmxStep,
|
MsJmxStep,
|
||||||
|
@ -173,12 +173,14 @@
|
||||||
},
|
},
|
||||||
saveAsApi() {
|
saveAsApi() {
|
||||||
let data = {};
|
let data = {};
|
||||||
|
this.api.request.id = uuid();
|
||||||
data.request = JSON.stringify(this.api.request);
|
data.request = JSON.stringify(this.api.request);
|
||||||
data.method = this.api.method;
|
data.method = this.api.method;
|
||||||
data.status = this.api.status;
|
data.status = this.api.status;
|
||||||
data.userId = this.api.userId;
|
data.userId = this.api.userId;
|
||||||
data.description = this.api.description;
|
data.description = this.api.description;
|
||||||
this.$emit('saveAsApi', data);
|
this.$emit('saveAsApi', data);
|
||||||
|
this.$emit('refresh');
|
||||||
},
|
},
|
||||||
updateApi() {
|
updateApi() {
|
||||||
let url = "/api/definition/update";
|
let url = "/api/definition/update";
|
||||||
|
|
|
@ -469,11 +469,12 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'report.testId': {
|
report: {
|
||||||
handler() {
|
handler() {
|
||||||
this.getJmxContent();
|
this.getJmxContent();
|
||||||
},
|
},
|
||||||
}
|
deep: true
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -220,6 +220,10 @@ export default {
|
||||||
if (dropType === "none" || dropType === undefined) {
|
if (dropType === "none" || dropType === undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (dropNode.data.id === 'root' && dropType === 'before') {
|
||||||
|
this.$emit('refresh');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
let param = this.buildParam(draggingNode, dropNode, dropType);
|
let param = this.buildParam(draggingNode, dropNode, dropType);
|
||||||
let list = [];
|
let list = [];
|
||||||
this.getNodeTree(this.treeNodes, draggingNode.data.id, list);
|
this.getNodeTree(this.treeNodes, draggingNode.data.id, list);
|
||||||
|
|
|
@ -8,17 +8,18 @@
|
||||||
@drag="drag"
|
@drag="drag"
|
||||||
@remove="remove"
|
@remove="remove"
|
||||||
@nodeSelectEvent="nodeChange"
|
@nodeSelectEvent="nodeChange"
|
||||||
|
@refresh="list"
|
||||||
ref="nodeTree"/>
|
ref="nodeTree"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NodeEdit from "./NodeEdit";
|
import NodeEdit from "./NodeEdit";
|
||||||
import {getCurrentProjectID} from "../../../../common/js/utils";
|
import {getCurrentProjectID} from "../../../../common/js/utils";
|
||||||
import MsNodeTree from "./NodeTree";
|
import MsNodeTree from "./NodeTree";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestCaseNodeTree",
|
name: "TestCaseNodeTree",
|
||||||
components: {MsNodeTree, NodeEdit },
|
components: {MsNodeTree, NodeEdit},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
|
|
Loading…
Reference in New Issue