Reading JSON data
Now that we know how to post JSON data, let's take a brief look at how to consume them in JMeter. Depending on the use case, you may find yourself dealing more with reading JSON than posting them. JMeter provides a number of ways to digest this information, store them if needed, and use them further down the chain in your test plans. Let's start with a simple use case. The example website has a link that provides usage of the last 10 entries of persons stored on the server. It can be reached by visiting http://sampleapp.jmeterbook.com/person/list.
If we were to process the JSON response and use the first and last name further down the chain, we can use a Regular Expression Extractor PostProcessor to extract these. Let's ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access