JMeter: Not able to extract value via Regular Expression Extractor and send in the subsequent request



  • I have a JMeter script in which I'm extracting value from the response of first request via Regular Expression Extractor and sending it in the second request.

    This mechanism works fine 80 percent of times but fails for the remaining 20 percent! When it fails the value passed in the second request displays as "NOT FOUND" in the 'View Results Tree' Request Body section. Although, the preceding first request gave the response in the exact expected manner.



  • It might be the case that your application gets overloaded and returns some error instead of the expected page with the dynamic value. You can temporary enable storing of response data by adding the next lines to user.properties file:

    jmeter.save.saveservice.output_format=xml
    jmeter.save.saveservice.response_data=true
    

    Once done you can run your JMeter test in command-line non-GUI mode as:

    jmeter -n -t test.jmx -l result.xml
    

    Once your test finishes open JMeter GUI, add View Results Tree listener and open result.xml file using "Browse" button.

    You should see all the responses in the listener.


    Be aware that by default JMeter shows only last 500 results, if your test generates more samplers - consider adding the next line to user.properties as well:

    view.results.tree.max_results=0
    

    More information:



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2