diff --git a/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java b/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java index 1ae3f91e26..feb3e61052 100644 --- a/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java +++ b/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java @@ -325,7 +325,7 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl requestResult.addPassAssertions(); } //xpath 提取错误会添加断言错误 - if (StringUtils.isNotBlank(responseAssertionResult.getMessage()) && !responseAssertionResult.getMessage().contains("The required item type of the first operand of")) { + if (StringUtils.isBlank(responseAssertionResult.getMessage()) || !responseAssertionResult.getMessage().contains("The required item type of the first operand of")) { responseResult.getAssertions().add(responseAssertionResult); } }