If you have this response: <response> <code>1</code> <error>Print Error</error> <error>Network Error</error> </response> With: - XPath: count(//*[code=1])=1 - True if nothing matches checked The expected result would be to have the Assertion fails as the XPath result is true. The result you get is that there is no difference wether you check or not True if nothing matches checked and assertion succeeds. There are in fact 2 issues: - True if nothing matches checked is confusing, and should be named "Invert assertion" as that's what one is expecting - Since the boolean function returns a node (True /False), True if nothing matches checked will always succeed
Hello Team, UbikLoadPack team is happy to contribute this bugfix to JMeter: PR : https://github.com/apache/jmeter/pull/460 Regards Twitter: @ubikloadpack Blog: https://www.ubik-ingenierie.com/blog/ Youtube channel: https://www.youtube.com/channel/UCUv5MHnWDyD-bDkRgOr5lmw
Author: pmouawad Date: Sun Jun 2 10:37:36 2019 New Revision: 1860511 URL: http://svn.apache.org/viewvc?rev=1860511&view=rev Log: Bug 63455 - XPath Assertion: "True if nothing matches" does not work if XPath expression returns a boolean Contributed by UbikLoadPack (https://ubikloadpack.com) This closes #460 Bugzilla Id: 63455 Modified: jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/XPathPanel.java jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties jmeter/trunk/src/core/org/apache/jmeter/util/XPathUtil.java jmeter/trunk/test/src/org/apache/jmeter/assertions/XPathAssertionTest.java jmeter/trunk/xdocs/changes.xml jmeter/trunk/xdocs/usermanual/component_reference.xml
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5080