Sources: http://jmeter.apache.org/, https://www.blazemeter.com/blog/9-easy-solutions-jmeter-load-test-%E2%80%9Cout-memory%E2%80%9D-failure, http://sundaramtiwari.blogspot.in/2012/09/jmeter-working-with-json.html
Useful to perform load/stress test on your application.
How to create a test plan.
Requirements:
- Thread Group (users) : to configure number of Hits, hit frequency, number of iteration of Hits etc.. { Add on Test Plan >> Threads(user) >> Thread group }
- HTTP Request Default : to configure domain to be tested. { Add on Thread group >> Config Elements >> HTTP Request Defaults}
- HTTP Request : to configure web method ( under configured domain ) to be tested. { Add on Thread group >> Sampler >> HTTP Request }
- HTTP Header Manager : In case if we need to send payload(Content-type:application/json) in POST request, this is used to define various headers. { Add on HTTP Request >> Config element >> HTTP Header Manager }
- Graph Results : shows various stats in line graph. { Add on Thread group >> Listener >> Graph Results }
- View Results Tree : shows stats in tree view. { Add on Thread group >> Listener >> View Results Tree }
- Summary Report : shows just counts in tabular format, yet effective and easy to understand. { Add on Thread group >> Listener >> Summary Report }
Ctrl + S to save the test plan. (File Saved with .jmx extension)
Ctrl + R to start threads { or click green colured triangular button. }
Ctrl + E to clear all collected stats { or click brroms button. }
Its Highly recommended NOT to use GUI for actual run. use it only to create your test plan and test with few number of threads.
Running jmeter from CLI (NON-GUI mode '-n', Test Plan file '-t', arguments '-D' ):
jmeter -n -t Test\ Plan.jmx -D HEAP="-Xms2000m -Xmx2500m"