Use JMeter script to do API functional testing and server load/stability testing
-
To install JMeter 2.13.
-
To install the following JMeter plugins
- Throughput Shaping Timer
- 3 Basic Graphs
- Servers Performance Monitoring
- WebSocket Sampler by Maciej Zaleski
All the plugins can all be managed by Jmeter Plugins Manager.
-
To extend JMeter library support for JSON by adding 3 minimal-json-0.9.4*.jar files from minimal-json to ${JMeterRoot}/lib/ext folder.
- Launch ApacheJMeter.jar, which is under ${JMeterRoot}/bin folder.
- Open the test script in JMeter and modify the user variable, envVariables_local, to fit your test environment.
The test cases are in SmokeTest_lite.jmx. You can see the test result in View Results Tress.
The test cases are in PerformanceTest_lite.jmx. You can see the test result in Transaction per Second and PerfMon Metric Collector.
Suggest to execute this performance test script in non-GUI mode with command
${JMeterRoot}/bin/jmeter -n -t PerformanceTest_lite.jmx -l LogFile.jtl
Here are some userful practices while doing performance testing via JMeter: 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure