fix(接口测试): 接口用例转性能测试时修改取样器的testName
--bug=1011595 --user=宋天阳 [性能测试]github #11743单接口用例转换为性能测试用例时,请求统计中的用例名称建议显示为原单接口用例名称,请修改 https://www.tapd.cn/55049933/s/1128591
This commit is contained in:
parent
850c1665d0
commit
d18b3eaf3a
|
@ -65,6 +65,10 @@ public class ParameterConfig extends MsParameter {
|
|||
* 是否是导入/导出操作
|
||||
*/
|
||||
private boolean isOperating;
|
||||
/**
|
||||
* 导入/导出操作时取样器的testname值
|
||||
*/
|
||||
private String operatingSampleTestName;
|
||||
/**
|
||||
* 项目ID,支持单接口执行
|
||||
*/
|
||||
|
|
|
@ -83,6 +83,8 @@ public class MsDubboSampler extends MsTestElement {
|
|||
// 非导出操作,且不是启用状态则跳过执行
|
||||
if (!config.isOperating() && !this.isEnable()) {
|
||||
return;
|
||||
}else if(config.isOperating() && StringUtils.isNotEmpty(config.getOperatingSampleTestName())){
|
||||
this.setName(config.getOperatingSampleTestName());
|
||||
}
|
||||
if (this.getReferenced() != null && "Deleted".equals(this.getReferenced())) {
|
||||
return;
|
||||
|
|
|
@ -134,6 +134,8 @@ public class MsHTTPSamplerProxy extends MsTestElement {
|
|||
// 非导出操作,且不是启用状态则跳过执行Ms
|
||||
if (!config.isOperating() && !this.isEnable()) {
|
||||
return;
|
||||
}else if(config.isOperating() && StringUtils.isNotEmpty(config.getOperatingSampleTestName())){
|
||||
this.setName(config.getOperatingSampleTestName());
|
||||
}
|
||||
if (this.getReferenced() != null && MsTestElementConstants.REF.name().equals(this.getReferenced())) {
|
||||
boolean ref = this.setRefElement();
|
||||
|
|
|
@ -83,6 +83,8 @@ public class MsJDBCSampler extends MsTestElement {
|
|||
// 非导出操作,且不是启用状态则跳过执行
|
||||
if (config != null && !config.isOperating() && !this.isEnable()) {
|
||||
return;
|
||||
}else if(config.isOperating() && StringUtils.isNotEmpty(config.getOperatingSampleTestName())){
|
||||
this.setName(config.getOperatingSampleTestName());
|
||||
}
|
||||
if (this.getReferenced() != null && MsTestElementConstants.REF.name().equals(this.getReferenced())) {
|
||||
boolean ref = this.setRefElement();
|
||||
|
|
|
@ -121,6 +121,8 @@ public class MsTCPSampler extends MsTestElement {
|
|||
// 非导出操作,且不是启用状态则跳过执行
|
||||
if (!config.isOperating() && !this.isEnable()) {
|
||||
return;
|
||||
}else if(config.isOperating() && StringUtils.isNotEmpty(config.getOperatingSampleTestName())){
|
||||
this.setName(config.getOperatingSampleTestName());
|
||||
}
|
||||
if (this.getReferenced() != null && MsTestElementConstants.REF.name().equals(this.getReferenced())) {
|
||||
boolean ref = this.setRefElement();
|
||||
|
|
|
@ -615,6 +615,7 @@ public class APITestService {
|
|||
ParameterConfig config = new ParameterConfig();
|
||||
config.setProjectId(runRequest.getProjectId());
|
||||
config.setOperating(true);
|
||||
config.setOperatingSampleTestName(runRequest.getName());
|
||||
|
||||
Map<String, EnvironmentConfig> envConfig = new HashMap<>();
|
||||
Map<String, String> map = runRequest.getEnvironmentMap();
|
||||
|
|
Loading…
Reference in New Issue