refactor(测试跟踪): 修复测试计划场景用例运行环境多显示问题

--user=郭雨琦
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001019831
This commit is contained in:
guoyuqi 2022-11-18 19:34:42 +08:00 committed by xiaomeinvG
parent 9b3b86ce6e
commit c77bc99a05
1 changed files with 9 additions and 0 deletions

View File

@ -294,6 +294,15 @@ public class ApiScenarioExecuteService {
if (MapUtils.isEmpty(runModeConfig.getEnvMap())) {
apiCaseExecuteService.setRunModeConfigEnvironment(runModeConfig, planEnvMap);
}
//对报告的envMap做过滤过滤多余的key
Map<String, String> diffEnvMap = new HashMap<>();
Map<String, String> envMap = runModeConfig.getEnvMap();
planEnvMap.forEach((k,v)->{
if (envMap.get(k)!=null){
diffEnvMap.put(k,envMap.get(k));
}
});
runModeConfig.setEnvMap(diffEnvMap);
report.setEnvConfig(JSON.toJSONString(runModeConfig));
}
// 生成文档结构