You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Soumya Nayak <sn...@firstam.com> on 2020/04/23 14:05:12 UTC

Extract Value from Request Body content

Hi All,

There is a requirement of extracting some values from the Request body content(dynamic body content) submitted in http request.
The http request is submitted as an XML request - the body content being picked up from multiple XML files from a folder. So have to extract some common tag values from these different XMLS to be used.

How can I achieve ?

Regards,
Soumya

******************************************************************************************
This message may contain confidential or proprietary information intended only for the use of the
addressee(s) named above or may contain information that is legally privileged. If you are
not the intended addressee, or the person responsible for delivering it to the intended addressee,
you are hereby notified that reading, disseminating, distributing or copying this message is strictly
prohibited. If you have received this message by mistake, please immediately notify us by
replying to the message and delete the original message and any copies immediately thereafter.

If you received this email as a commercial message and would like to opt out of future commercial
messages, please let us know and we will remove you from our distribution list.

Thank you.~
******************************************************************************************
FAFLD

Re: Extract Value from Request Body content

Posted by "glinius@live.com" <gl...@live.com>.
You can use  JSR223 PreProcessor
<https://jmeter.apache.org/usermanual/component_reference.html#JSR223_PreProcessor>  
to store the request body into a JMeter Variable like:


> vars.put('request', sampler.getArguments().getArgument(0).getValue())

Once done you will be able to use normal  XPath Extractor
<https://www.blazemeter.com/blog/using-xpath-extractor-jmeter-0/>  , just
set "Apply to: -> JMeter Variable Name to use -> request" and you will be
able to execute arbitrary XPath queries to parse your XML payload



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org