fix(接口定义): 修复执行缺陷

This commit is contained in:
fit2-zhao 2020-12-23 19:27:19 +08:00
parent 2ae6f3ff62
commit e4d245e505
1 changed files with 3 additions and 1 deletions

View File

@ -55,7 +55,9 @@ public class MsScenario extends MsTestElement {
if (StringUtils.isNotEmpty(environmentId)) {
ApiTestEnvironmentService environmentService = CommonBeanFactory.getBean(ApiTestEnvironmentService.class);
ApiTestEnvironmentWithBLOBs environment = environmentService.get(environmentId);
config.setConfig(JSONObject.parseObject(environment.getConfig(), EnvironmentConfig.class));
if (environment != null && environment.getConfig() != null) {
config.setConfig(JSONObject.parseObject(environment.getConfig(), EnvironmentConfig.class));
}
}
if (CollectionUtils.isNotEmpty(this.getVariables())) {
config.setVariables(this.variables);