fix(接口测试): 修复执行带有并行控制器的场景,报告多显示了一个断言的缺陷

--bug=1028021 --user=王孝刚 【接口测试】场景-生成报告-并行控制器下的多了断言步骤
https://www.tapd.cn/55049933/s/1396294
This commit is contained in:
wxg0103 2023-07-21 18:12:40 +08:00 committed by fit2-zhao
parent 785e8d75ce
commit a263c419c3
1 changed files with 9 additions and 0 deletions

View File

@ -212,6 +212,15 @@ public class ApiScenarioReportStructureService {
children.setAllIndex(StringUtils.EMPTY + (children.getIndex() == 0 ? (i + 1) : children.getIndex()));
children.setResourceId(resourceId + "_" + children.getAllIndex());
}
if (StringUtils.equals(element.optString(TYPE), "GenericController") && element.has(HASH_TREE)) {
JSONArray jsonArray = element.optJSONArray(HASH_TREE);
for (int j = 0; j < jsonArray.length(); j++) {
if (StringUtils.equals(jsonArray.optJSONObject(j).optString(TYPE), ElementConstants.ASSERTIONS)) {
jsonArray.remove(j);
break;
}
}
}
dto.getChildren().add(children);
if (element.has(HASH_TREE) && !REQUESTS.contains(children.getType())) {
JSONArray elementJSONArray = element.optJSONArray(HASH_TREE);