fix:postman 导入脚本包含Tests脚本

This commit is contained in:
chenjianxing 2021-02-22 13:03:00 +08:00
parent adb134e56f
commit 0acadee061
1 changed files with 2 additions and 2 deletions

View File

@ -53,12 +53,12 @@ public abstract class PostmanAbstractParserParser<T> extends ApiImportAbstractPa
.collect(Collectors.toList());
event.forEach(item -> {
PostmanScript script = item.getScript();
if (script != null) {
if (script != null && item.getListen().contains("prerequest")) {
List<String> exec = script.getExec();
if (CollectionUtils.isNotEmpty(exec)) {
exec.forEach(col -> {
if (StringUtils.isNotEmpty(col)) {
scriptStr.append(col + "/n");
scriptStr.append(col + "\n");
}
});
}