Hello world for jmeter
A very basic example of Jmeter test plan based on (http://jmeter.apache.org/usermanual/build-web-test-plan.html)
sudo apt-get install jmeter jmeter-http
sudo apt-get install ruby
sudo gem install sinatra
sudo apt-get install golang
cd jmeter_hello_world
gobuild api
Based on (http://soryy.com/blog/2014/not-another-go-net-http-tutorial/)
Fire up an API. Both examples run on port 8080 so you can only run one at a time.
Both API implementations are equivalent providing a \random
endpoint which takes an optional size
parameter.
If the size parameter is missing a random number of elements will be returned 0 < x < 200
-
Ruby api
ruby api.rb
-
Go
./api
To test your api is running, in another shell run
curl localhost:8080/random?size=2
Start JMeter
jmeter
Once Jmeter has fired up, load up the test plan (File -> Open) and select 'SimpleTestPlan.jmx' To run the test do 'Run -> Start' and navigate to the 'Graph Results' in the tree on the left to observe the test performance.
Inspired by (https://github.com/mjgpy3/jmeter_toy)