You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2019/05/21 13:00:30 UTC

[Bug 63455] New: XPath Assertion: "True if nothing matches" does not work if XPath expression returns a boolean

https://bz.apache.org/bugzilla/show_bug.cgi?id=63455

            Bug ID: 63455
           Summary: XPath Assertion: "True if nothing matches" does not
                    work if XPath expression returns a boolean
           Product: JMeter
           Version: 5.1.1
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: p.mouawad@ubik-ingenierie.com
  Target Milestone: JMETER_5.1.1

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

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63455] XPath Assertion: "True if nothing matches" does not work if XPath expression returns a boolean

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63455

UbikLoadPack support <su...@ubikloadpack.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|5.1.1                       |2.10
           Keywords|                            |PatchAvailable
   Target Milestone|JMETER_5.1.1                |JMETER_5.2

--- Comment #1 from UbikLoadPack support <su...@ubikloadpack.com> ---
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

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63455] XPath Assertion: "True if nothing matches" does not work if XPath expression returns a boolean

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63455

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
           Keywords|                            |FixedInTrunk
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om

--- Comment #2 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
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

-- 
You are receiving this mail because:
You are the assignee for the bug.