提交 e9a077da 编写于 作者: C Captain.B 提交者: BugKing

fix(接口测试): 修复 backend listener null 判断

上级 05307aae
......@@ -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();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册