An artillery is a tool for generating load on HTTP, Socket.io and Web-Socket based applications. The artillery load testing tool is a Modern, Powerful & Easy to use the tool. It will help your application to check Performance, Scalable & Reliable under heavy load.
Load testing is a complex and we are forward to sharing our knowledge with you all. You can create Additional Socket per simulated user. It provides support for scripting complex virtual user interactions and detailed stats and graphical reports to help analyze performance.
- First Install the Latest version of Node in your device.
- To Install Artillery tool, Run the command in Command Prompt
|npm install -g artillery|
Ø To check Artillery Installed or Not, run this command
Ø To Run a Quick Test, Run this Command
|artillery quick –duration 60 –rate 10 -n 20 http://my.app.dev/api/resource|
Ø To Run a Test Script
|config: target: ‘http://my.app.dev’ phases: – duration: 60 arrivalRate: 20 defaults: headers: x-my-service-auth: ‘987401838271002188298567’ scenarios: – flow: – get: url: “/api/resource”|
Ø If you run differently, then Copy the Given code in Test.yml File and Run command
|artillery run Test.yml|
Ø Reading the Output: – While Artillery is running, you will see something like this printed to the terminal:
Scenarios launched: 5
Scenarios completed: 5
Requests completed: 58
RPS sent: 0.86
While the Artillery Test is running, intermediate stats will be printed every 10 seconds (By default) and a complete report will be printed at the end of the test.
- Scenarios launched is the number of virtual users created in the preceding 10 seconds (or in total for the final report)
- Scenarios completed is the number of virtual users that completed their scenarios in the preceding 10 seconds (or in the whole test). Note: this is the number of completed sessions, not the number of sessions started and completed in a 10-second interval.
- Requests completed is the number of HTTP requests and responses or WebSocket messages sent
- RPS sent is the average number of requests per second completed in the preceding 10 seconds (or throughout the test)
- Request latency and Scenario duration are in milliseconds, and p95 and p99 values are the 95th and 99th percentile values (a request latency p99 value of 500ms means that 99 out of 100 requests took 500ms or less to complete).
- Codes are the count of HTTP response codes.
If there are any errors (such as socket timeouts), those will be printed under Errors in the report as well.
Artillery used to build scalable applications that stay performant & resilient under high load.
Ask if you have any query in mind in the comment box.
We provide best web and mobile based application support, click here.
Share this post if you found it helpful.