Performance tests' sample running a search at Google.
You'll need:
- Node;
Install Dependencies:
npm install
artillery run --config <config file to all tests>.yaml -e <env config. ex: staging> <./file_to/test>.yaml -o <json report>.json
DEBUG=http artillery run --config <config file to all tests>.yaml -e <env config. ex: staging> <./file_to/test>.yaml -o <json report>.json
DEBUG=http:response artillery run --config <config file to all tests>.yaml -e <env config. ex: staging> <./file_to/test>.yaml -o <json report>.json
This dependency is found in package.json, but if for some reason it doesn't install, you can try it this way:
npm install artillery-plugin-publish-metrics
or (for global instalation):
npm install -g artillery-plugin-publish-metrics
Then to run you need to export first the data-dog-api-key, and then run the tests
export DD_API_KEY=<data-dog-api-key>
artillery run --config <config file to all tests>.yaml -e <env config. ex: staging> <./file_to/test>.yaml
artillery report <name of the json created on the run>.json
A package.json was generated for this folder, targeting only the dependencies used for the test. For now there is only one example script configured. But basically the execution would be:
npm run test
To run these tests you'll need a X-RapidAPI-Key, it's just to go to Google API documentation and signup to get your X-RapidAPI-Key
, after this you'll need to run:
export RAPID_API_KEY=<google-api-key>
Create 50 virtual users every second for 5 minutes:
phases:
- duration: 300
arrivalRate: 50
Constant arrival rate with no more than 50 concurrent VUs:
phases:
- duration: 300
arrivalRate: 10
maxVusers: 50
Ramp up arrival rate from 10 to 50 over 2 minutes, followed by 10 minutes at 50 arrivals per second:
phases:
- duration: 120
arrivalRate: 10
rampTo: 50
name: "Warm up the application"
- duration: 600
arrivalRate: 50
name: "Sustained max load"
Create 20 virtual users in 60 seconds (approximately one every 3 seconds):
phases:
- duration: 60
arrivalCount: 20
A pause:
phases:
- pause: 60
For more info you can access Artillery Docs.