diff --git a/api-test/frontend/src/business/definition/components/debug/DebugHttpPage.vue b/api-test/frontend/src/business/definition/components/debug/DebugHttpPage.vue index 6be37d1d9b..8730b63d95 100644 --- a/api-test/frontend/src/business/definition/components/debug/DebugHttpPage.vue +++ b/api-test/frontend/src/business/definition/components/debug/DebugHttpPage.vue @@ -276,6 +276,7 @@ export default { this.debugForm.path = url.pathname; } else { this.debugForm.path = url; + this.debugForm.url = url; } }, getURL(urlStr) { diff --git a/framework/sdk-parent/jmeter/src/main/java/org/apache/jmeter/assertions/JSONPathAssertion.java b/framework/sdk-parent/jmeter/src/main/java/org/apache/jmeter/assertions/JSONPathAssertion.java index 7d3ed1d941..6c230bc197 100644 --- a/framework/sdk-parent/jmeter/src/main/java/org/apache/jmeter/assertions/JSONPathAssertion.java +++ b/framework/sdk-parent/jmeter/src/main/java/org/apache/jmeter/assertions/JSONPathAssertion.java @@ -129,7 +129,6 @@ public class JSONPathAssertion extends AbstractTestElement implements Serializab public boolean isUseRegex() { return getPropertyAsBoolean(ISREGEX, true); } - private static final String KEY_PRE = "[]"; private void doAssert(String jsonString) { Object value = JsonPath.read(jsonString, getJsonPath()); @@ -213,7 +212,7 @@ public class JSONPathAssertion extends AbstractTestElement implements Serializab } for (Object subj : value.toArray()) { - if (!StringUtils.equalsAnyIgnoreCase(getOption(), "NOT_CONTAINS", "EQUALS")) { + if (!StringUtils.equals(getOption(), "NOT_CONTAINS")) { if (subj == null && this.isExpectNull() || isEquals(subj)) { return true; } @@ -221,7 +220,7 @@ public class JSONPathAssertion extends AbstractTestElement implements Serializab result.add(isEquals(subj)); } } - if (CollectionUtils.isNotEmpty(result) && StringUtils.equalsAnyIgnoreCase(getOption(), "NOT_CONTAINS", "EQUALS")) { + if (CollectionUtils.isNotEmpty(result) && StringUtils.equals(getOption(), "NOT_CONTAINS")) { if (result.stream().filter(item -> item == true).collect(Collectors.toList()).size() == result.size()) { return true; } else { @@ -255,9 +254,6 @@ public class JSONPathAssertion extends AbstractTestElement implements Serializab private boolean isEquals(Object subj) { String str = DocumentUtils.objectToString(subj, decimalFormatter); if (isUseRegex()) { - if (StringUtils.equals(str,KEY_PRE)) { - return false; - } if (USE_JAVA_REGEX) { return JMeterUtils.compilePattern(getExpectedValue()).matcher(str).matches(); } else {