Bug 54160 - Add support for xpath assertion to apply to a JMeter variable.
Add support for xpath assertion to apply to a JMeter variable.
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: Main
2.8
All All
: P2 enhancement (vote)
: ---
Assigned To: JMeter issues mailing list
: PatchAvailable
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2012-11-16 23:07 UTC by Germán Bisogno
Modified: 2013-01-05 21:20 UTC (History)
1 user (show)



Attachments
Add support to xpath assertion in order to apply to (4.21 KB, patch)
2012-11-19 23:00 UTC, Germán Bisogno
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Germán Bisogno 2012-11-16 23:07:56 UTC
Currently if you need to verify a value into an xml file that is already in a JMeter variable, you need to extract it first with a xpath extractor applying it to the variable, then you need to add a response assertion and apply it to the variable value.  So, you need to use two objects.

I suggest add support to the xpath assertion to apply it to a JMeter variable as the response assertion has.

I mean, the funcionality in order to "apply to".

It will have a new container like.

Apply to:

"Main sample only" and another radio button as "JMeter variable"
Comment 1 Germán Bisogno 2012-11-19 23:00:51 UTC
Created attachment 29611 [details]
Add support to xpath assertion in order to apply to
Comment 2 Germán Bisogno 2012-11-19 23:02:42 UTC
Hi, I'm attaching a candidate patch for this functionality.  I've tested it locally and worked for me.  Please, take a look and review.
Comment 3 Philippe Mouawad 2013-01-05 21:19:06 UTC
Date: Sat Jan  5 21:18:21 2013
New Revision: 1429387

URL: http://svn.apache.org/viewvc?rev=1429387&view=rev
Log:
Bug 54160 - Add support for xpath assertion to apply to a JMeter variable.
Bugzilla Id: 54160

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/assertions/XPathAssertion.java
    jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/XPathAssertionGui.java
    jmeter/trunk/xdocs/changes.xml
Comment 4 Philippe Mouawad 2013-01-05 21:20:23 UTC
Patch applied with some changes:
- Variable must have encoding set to UTF-8 so that it works the same as XPathExtractor

Thank you very much for the patch