To export the database test in the mongodb :
- Unzip dump.zip
- cd into the parent directory of dump folder. Do not 'cd' into the dump folder.
- Run command sudo mongorestore
- It will create a db test and a collection zips with data in the test.
To run the test Plan in the JMeter :
-
Once database is imported, open the mongodb.jmx file in the JMeter.
-
Put your mongodb parameters in user defined variables section of Test Plan.
-
Run the test plan. Make sure request 'connect' is always enabled.
-
If you want to fetch the data using csv, update the csv path, where your csv file is present, in the csv dataset config.
-
Enable the Loop Controller.
-
To fetch all the records of csv, Make sure Loop count of Loop Controller should be same as the number of entries in the csv file.
-
Run the test plan.