JMeter Fetch Data from JSON File in Jmeter | How to Read JSON File in Jmeter

preview_player
Показать описание
JSON File in Jmeter
How to read / fetch data from Json file

Performance Testing using JMeter

This video explains complete steps to Read or Get Data from JSON File in Jmeter. The JSON file will be present in test suite repository and we can read that file data and pass it to the request. To read the file we can write simple BeanShell script.

JSON body used the video :
{
"resourceType": "Patient",
"identifier": [ { "system": "urn:oid:1.2.36.146.595.217.0.1", "value": "123786" } ],
"name": [ {
"family": "Chalmers",
"given": [ "Peter", "James" ]
} ],
"gender": "male",
"birthDate": "1974-12-25"
}

Steps to achieve this :
1. Create a simple test suite and add a Post request
2. Add assertion and listener to validate the result
3. Add a Post Processor JSR223 Post Processor and write simple lines of code to read data from the JSON response

If you like this video subscribe to my channel Software Automation Experience and keep tuning up for new videos.

To Learn JMeter step-by-step for Beginners to Advanced level, You can check the below useful videos on my channel

1. How to Automate Rest API using Jmeter | API Automation testing

2. Install JMeter and Launch it from any folder

3. Create First Jmeter Test Suite - CI Automation Suite for Rest API Project from scratch

4. Read Test Data from CSV file in Jmeter - CSV Data Set Config - Data Driven Testing

5. Write data to CSV file |CSV Data Set Config

7. Jmeter Plugins Manager


8. Read Configurations in Jmeter using Step by Step Debugger


9. Jmeter result files generation after every test suite execution

10. Read CICD Pipeline Results in Jmeter

11. Jmeter Non GUI mode - Execute test suite from Command Line Interface

12. How your Jmeter test suite should look like

13. Set and Read Variables and Property values in Jmeter

14. Generate HTML Report for JMeter Test Suite Run


15. Read/Get Data from JSON Response


#jmeter #automation #automationtesting #api #apiautomation #performancetesting #softwaretesting #softwaretester #softwaretesters #softwaretestingsolutions #softwaretestingtraining #softwaretest #sdet #jmeterresults #TestSuiteResults #json
Рекомендации по теме
Комментарии
Автор

Hello sir,
Need to know if we have a GET request containing array object is it possible to store it in the similar manner that you explained?

akshatsaxena
Автор

Hello Sir,
First of all thanks for this knowledgeable content. I have one query that if the JSON file has one Order ID (unique) for an order creation and we are sending this request to the server for 1 user/1 iteration then the same is being accepted by the server but how to send the same multiple requests for multiple users having different Order ID in the JSON file with each request because server is only accepting unique Order ID with each request.
Your solution will be highly appreciated 🙂

manishvarshney
Автор

you have knowledge but it is like you are not teaching you are telling some when what you have done people who are new cant understand

HOPE