You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Pat Gell <pa...@gmail.com> on 2021/11/19 20:07:54 UTC

Visualize XPath-Extracted value in dashboard report

Hello,

I would like to extract a value with XPath-Extractor from a HTTP-Response
and visualize the value in the dashboard report.

The following is an example response:











*<feed>    <title>queue://test-queue</title>    <entry>
<title>ID:75f70ae6f5a7-44259-1637351412920-4:1:1:1:1</title>    </entry>
<entry>
<title>ID:75f70ae6f5a7-44259-1637351412920-4:1:1:1:2</title>    </entry>
<entry>
<title>ID:75f70ae6f5a7-44259-1637351412920-4:1:1:1:3</title>
</entry></feed>*

I want to extract the count of '<entry>' elements from the response and
visualize it in the dashboard report of JMeter.

Could someone give me an hint how I could accomplish this?

Thank you for your help!


Best regards
Patrick

Re: Visualize XPath-Extracted value in dashboard report

Posted by Dmitri T <gl...@live.com>.
 1. Add XPath2 Extractor
    <https://www.blazemeter.com/blog/the-jmeter-xpath2-extractor-how-to-achieve-better-correlations>
    as a child of the request which returns the above XML and configure
    it as follows:
      * "Name of created variable" - anything meaningful, i.e. *entries*
      * XPath Query: *count(/feed/entry)*
 2. Add the next line to /user.properties/ file (lives in "bin" folder
    of your JMeter installation): *sample_variables=entries*. It will
    instruct JMeter to save the count of <entry> tags in the response
    into .jtl results file, see Sample Variables
    <https://jmeter.apache.org/usermanual/listeners.html#sample_variables>
    documentation chapter for more information if needed
 3. Follow instructions from Generating customs graphs over time
    <https://jmeter.apache.org/usermanual/generating-dashboard.html#customs_graphs>
    chapter of JMeter Documentation, just change *ts-hit* variable name
    to *entries*

On 11/19/2021 9:07 PM, Pat Gell wrote:
> Hello,
>
> I would like to extract a value with XPath-Extractor from a HTTP-Response
> and visualize the value in the dashboard report.
>
> The following is an example response:
>
>
>
>
>
>
>
>
>
>
>
> *<feed>    <title>queue://test-queue</title>    <entry>
> <title>ID:75f70ae6f5a7-44259-1637351412920-4:1:1:1:1</title>    </entry>
> <entry>
> <title>ID:75f70ae6f5a7-44259-1637351412920-4:1:1:1:2</title>    </entry>
> <entry>
> <title>ID:75f70ae6f5a7-44259-1637351412920-4:1:1:1:3</title>
> </entry></feed>*
>
> I want to extract the count of '<entry>' elements from the response and
> visualize it in the dashboard report of JMeter.
>
> Could someone give me an hint how I could accomplish this?
>
> Thank you for your help!
>
>
> Best regards
> Patrick
>