What is nGrinder?
nGrinder is a platform for stress tests that enables user-defined script, test execution, real-time monitoring, and report generation.
It is very easy to setup via Docker and highly flexible with user-defined script which is based on Groovy codes and JUnit.
While performing stress test with other tools, you may find it annoying to generate reports for all tests every time and to archive test results and configurations to compare them among tests.
Also, you may be limited to do some kinds of tests because the stress tests tool does not support or inconvenient to extend its feature.
In some circumstances, you may want to run tests with distributed agents to simulate multi clients or multi zones.
You may want to test a software which does not provide HTTP protocol such as Kafka.
But these kinds of features are not supported in many stress test tool.
With nGrinder, you can literally do whatever you want.
Since a test script is defined with codes(Groovy), it's very flexible and also easy to use because it is based on JUnit.
You can test any kinds of product with any kinds of protocol because you can include libraries in a test script.
You can see the tendency with real-time reports and monitor all agents status.
NGrinder will automatically archive all results with test configurations and collect all logs from distributed agents after tests.
You can easily add more distributed agents to increase loads and setup multi zones to simulate global traffics.
Getting started with nGrinder
nGrinder is comprised of controllers and agents.
You can easily setup them with Docker.
Controller
docker run -d -v ~/ngrinder-controller:/opt/ngrinder-controller -p 80:80 -p 16001:16001 -p 12000-12009:12000-12009 ngrinder/controller:3.4
Agent
docker run -v ~/ngrinder-agent:/opt/ngrinder-agent -d ngrinder/agent:3.4 ${CONTROLLER_IP}:80
For more information, please refer to this: https://hub.docker.com/r/ngrinder/controller/
You can connect to the controller with the web port(80).
The default credentials are admin/admin.
Once you login to the nGrinder, you can check whether your agent is properly connected to the controller.
If there is no problem, you can see one agent that you just run.
Now you can move to the Script page and create a script.
Once you create a script with URL to test, nGrinder will create basic boilerplate codes.
As you can see, nGrinder script is defined with Groovy codes and JUnit.
You can define your test scenario in a method and annotate it with @Test.
You can validate your script before saving.
Now it's time to run a test.
You can move to the Performance Test page and create a test.
Choose the number of agents, virtual users and the script you've just created.
Once you click Save and Start button, the test will begin.
Congratulations! You just performed DDOS attack against Google web site : )
Once test is over, you can see the test summary with the detailed report.
In case there are any errors happened, you can see agents logs.
Reference
For more information, please refer to the followings:
- nGrinder github: https://github.com/naver/ngrinder
- User guide: https://github.com/naver/ngrinder/wiki/User-Guide