Search code examples
jsonapijmeterresponse

Jmeter Extracting unique parameters response


I just want to extract version parameter but if found I multiple/duplicate values example 2-327RC212 it will return me once and move with succeeding.

Image


Solution

  • So what do you want? Extract the values without the duplicates? If yes - you will need to switch to JSR223 PostProcessor and write your extraction logic in Groovy.

    You could use JsonSlurper class to fetch the values and store them into a HashSet, then add each value from the HashSet into JMeter Variables.

    Demo:

    enter image description here

    More information: Apache Groovy - Parsing and producing JSON