fix(接口定义): 修复case选择环境组执行生成报告有未执行的缺陷

--bug=1023586 --user=王孝刚 【接口测试】场景中引用了case,选择环境组,执行场景后,这个case还是没有环境
https://www.tapd.cn/55049933/s/1340015
This commit is contained in:
wxg0103 2023-02-22 14:56:48 +08:00 committed by wxg0103
parent 063921f059
commit 5513d291c8

View File

@ -88,6 +88,7 @@ public class MsHashTreeService {
private static final String FOLLOW_REDIRECTS = "followRedirects";
private static final String AUTO_REDIRECTS = "autoRedirects";
private static final String ALIAS = "alias";
private static final String INDEX = "index";
public void setHashTree(JSONArray hashTree) {
// 将引用转成复制
@ -145,6 +146,7 @@ public class MsHashTreeService {
if (apiTestCase != null) {
if (StringUtils.equalsIgnoreCase(element.optString(REFERENCED), REF)) {
JSONObject refElement = JSONUtil.parseObject(apiTestCase.getRequest());
refElement.remove(INDEX);
ElementUtil.dataFormatting(refElement);
JSONArray array = refElement.optJSONArray(HASH_TREE);
ElementUtil.copyBean(element, refElement);