fix: 接口用例执行报错

This commit is contained in:
chenjianxing 2021-03-30 10:52:59 +08:00
parent 21bf611d2a
commit 93b63980ea
1 changed files with 2 additions and 1 deletions

View File

@ -358,7 +358,8 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl
requestResult.addPassAssertions();
}
//xpath 提取错误会添加断言错误
if (StringUtils.isBlank(responseAssertionResult.getMessage()) || !responseAssertionResult.getName().endsWith("XPath2Extractor")) {
if (StringUtils.isBlank(responseAssertionResult.getMessage()) ||
(StringUtils.isNotBlank(responseAssertionResult.getName()) && !responseAssertionResult.getName().endsWith("XPath2Extractor"))) {
responseResult.getAssertions().add(responseAssertionResult);
}
}