fix: 修复添加事务控制器后场景统计有问题、场景导入har不成功的问题

修复添加事务控制器后场景统计有问题、场景导入har不成功的问题
This commit is contained in:
song-tianyang 2021-05-26 17:06:53 +08:00 committed by 刘瑞斌
parent e5d249feaa
commit 5b42f01b80
2 changed files with 7 additions and 0 deletions

View File

@ -90,6 +90,10 @@ public class TestResult {
if (StringUtils.isNotEmpty(subItem.getName()) && subItem.getName().indexOf(SEPARATOR) != -1) {
String array[] = subItem.getName().split(SEPARATOR);
subItem.setName(array[0]);
if (StringUtils.isNotEmpty(subItem.getScenario())) {
List<String> id_names = JSON.parseObject(subItem.getScenario(), List.class);
this.setStatus(id_names, subItem.getError() > 0);
}
}
});
}
@ -104,5 +108,6 @@ public class TestResult {
}
}
this.setScenarioTotal(this.margeScenariMap.size());
}
}

View File

@ -65,6 +65,8 @@ public abstract class HarScenarioAbstractParser<T> extends ApiImportAbstractPars
HarPostData content = requestBody.postData;
if (!StringUtils.equalsIgnoreCase("GET", requestBody.method) && requestBody.postData == null) {
return;
}else if(requestBody.postData == null){
return;
}
String contentType = content.mimeType;
if (StringUtils.isEmpty(contentType)) {