fix(接口测试): 修复由于TCP取样器的className没有默认值造成的问题
--bug=1013827 --user=宋天阳 【接口测试】github#14394,TCP接口定义导入JMX生成的接口(没选tcpclient),在test页面点击测试,页面无响应 https://www.tapd.cn/55049933/s/1174847
This commit is contained in:
parent
e0e89283e3
commit
e630ced5c4
|
@ -294,7 +294,11 @@ public class MsTCPSampler extends MsTestElement {
|
|||
ElementUtil.setBaseParams(tcpSampler, this.getParent(), config, this.getId(), this.getIndex());
|
||||
tcpSampler.setProperty(TestElement.TEST_CLASS, TCPSampler.class.getName());
|
||||
tcpSampler.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("TCPSamplerGui"));
|
||||
tcpSampler.setClassname(this.getClassname());
|
||||
if(StringUtils.isEmpty(this.getClassname())){
|
||||
tcpSampler.setClassname("TCPClientImpl");
|
||||
}else{
|
||||
tcpSampler.setClassname(this.getClassname());
|
||||
}
|
||||
tcpSampler.setServer(this.getServer());
|
||||
tcpSampler.setPort(this.getPort());
|
||||
tcpSampler.setConnectTimeout(this.getCtimeout());
|
||||
|
|
|
@ -271,6 +271,9 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.currentProjectId = getCurrentProjectID();
|
||||
if (!this.request.classname) {
|
||||
this.request.classname = "TCPClientImpl";
|
||||
}
|
||||
if (!this.request.parameters) {
|
||||
this.$set(this.request, 'parameters', []);
|
||||
this.request.parameters = [];
|
||||
|
|
Loading…
Reference in New Issue