fix(接口测试): 修复场景转性能测试时由于json格式问题引起的报错
--bug=1013687 --user=宋天阳 [性能测试]Github #14092通过自动化场景创建性能测试失败 https://www.tapd.cn/55049933/s/1169745
This commit is contained in:
parent
776a90b1c6
commit
aa235b9c60
|
@ -813,8 +813,7 @@ public class ApiAutomationService {
|
|||
config.setOperating(true);
|
||||
config.getExcludeScenarioIds().add(apiScenario.getId());
|
||||
try {
|
||||
|
||||
MsScenario scenario = JSONObject.parseObject(apiScenario.getScenarioDefinition(), MsScenario.class);
|
||||
MsScenario scenario = JSONObject.parseObject(apiScenario.getScenarioDefinition(), MsScenario.class,Feature.DisableSpecialKeyDetect);
|
||||
if (scenario == null) {
|
||||
return null;
|
||||
}
|
||||
|
@ -824,7 +823,7 @@ public class ApiAutomationService {
|
|||
String environmentJson = apiScenario.getEnvironmentJson();
|
||||
String environmentGroupId = apiScenario.getEnvironmentGroupId();
|
||||
if (StringUtils.equals(environmentType, EnvironmentType.JSON.name()) && StringUtils.isNotBlank(environmentJson)) {
|
||||
scenario.setEnvironmentMap(JSON.parseObject(environmentJson, Map.class));
|
||||
scenario.setEnvironmentMap(JSON.parseObject(environmentJson, Map.class,Feature.DisableSpecialKeyDetect));
|
||||
} else if (StringUtils.equals(environmentType, EnvironmentType.GROUP.name()) && StringUtils.isNotBlank(environmentGroupId)) {
|
||||
Map<String, String> envMap = environmentGroupProjectService.getEnvMap(environmentGroupId);
|
||||
scenario.setEnvironmentMap(envMap);
|
||||
|
|
Loading…
Reference in New Issue