fix(接口测试): 修复引用的sql用例有的参数显示不完全的缺陷

--bug=1024971 --user=王孝刚 【接口测试】场景中引用SQL用例后,修改原始用例,增加按列存储信息,场景中的用例没变 https://www.tapd.cn/55049933/s/1357334
This commit is contained in:
wxg0103 2023-03-29 18:16:36 +08:00 committed by fit2-zhao
parent 7eea72f01a
commit bbd102017a
1 changed files with 13 additions and 0 deletions

View File

@ -89,6 +89,11 @@ public class MsHashTreeService {
private static final String AUTO_REDIRECTS = "autoRedirects";
private static final String ALIAS = "alias";
private static final String INDEX = "index";
private static final String QUERY = "query";
private static final String VARIABLE_NAMES = "variableNames";
private static final String DATASOURCEID = "dataSourceId";
private static final String RESULT_VARIABLE = "resultVariable";
private static final String ENV_Id = "environmentId";
public void setHashTree(JSONArray hashTree) {
// 将引用转成复制
@ -163,6 +168,14 @@ public class MsHashTreeService {
element.put(FOLLOW_REDIRECTS, refElement.opt(FOLLOW_REDIRECTS));
element.put(AUTO_REDIRECTS, refElement.opt(AUTO_REDIRECTS));
element.put(ALIAS, refElement.opt(ALIAS));
if (StringUtils.equals(refElement.optString(TYPE), "JDBCSampler")) {
element.put(QUERY, refElement.opt(QUERY));
element.put(VARIABLE_NAMES, refElement.opt(VARIABLE_NAMES));
element.put(DATASOURCEID, refElement.opt(DATASOURCEID));
element.put(RESULT_VARIABLE, refElement.opt(RESULT_VARIABLE));
element.put(ENV_Id, refElement.opt(ENV_Id));
}
if (array != null) {
JSONArray sourceHashTree = element.optJSONArray(HASH_TREE);
Map<String, List<JSONObject>> groupMap = ElementUtil.group(sourceHashTree);