fix(接口测试): 修复 backend listener null 判断
This commit is contained in:
parent
d4a55d124f
commit
9c013c0039
|
@ -285,7 +285,7 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl
|
|||
String executionEnvironment = apiScenario.getScenarioDefinition();
|
||||
JSONObject json = JSONObject.parseObject(executionEnvironment);
|
||||
String name = "";
|
||||
if (json.getString("environmentMap").length() > 2) {
|
||||
if (json != null && json.getString("environmentMap") != null && json.getString("environmentMap").length() > 2) {
|
||||
JSONObject environment = JSONObject.parseObject(json.getString("environmentMap"));
|
||||
String environmentId = environment.get(apiScenario.getProjectId()).toString();
|
||||
name = apiAutomationService.get(environmentId).getName();
|
||||
|
|
Loading…
Reference in New Issue