fix(接口测试): 修复sql自定义请求没有名字,生成报告为空的缺陷

--bug=1025822 --user=王孝刚 【接口测试】接口场景中添加sql类型的自定义请求-没有输入请求名称-列表中执行报告为空
https://www.tapd.cn/55049933/s/1366770
This commit is contained in:
wxg0103 2023-04-26 11:08:28 +08:00 committed by fit2-zhao
parent 1a7ec9689d
commit 724981b469
1 changed files with 3 additions and 0 deletions

View File

@ -238,6 +238,9 @@ public class MsJDBCSampler extends MsTestElement {
ElementUtil.jdbcProcessor(sampler, config, vo);
sampler.setEnabled(this.isEnable());
sampler.setName(this.getName());
if (StringUtils.isEmpty(this.getName())) {
sampler.setName(ElementConstants.JDBC_SAMPLER);
}
if (config.isOperating()) {
String[] testNameArr = sampler.getName().split("<->");
if (testNameArr.length > 0) {