Performance tests' sample running a search at Google.
You'll need:
- Node;
Install Dependencies:
npm installartillery run --config <config file to all tests>.yaml -e <env config. ex: staging> <./file_to/test>.yaml -o <json report>.jsonDEBUG=http artillery run --config <config file to all tests>.yaml -e <env config. ex: staging> <./file_to/test>.yaml -o <json report>.jsonDEBUG=http:response artillery run --config <config file to all tests>.yaml -e <env config. ex: staging> <./file_to/test>.yaml -o <json report>.jsonThis 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-metricsor (for global instalation):
npm install -g artillery-plugin-publish-metricsThen 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>.yamlartillery report <name of the json created on the run>.jsonA 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 testTo 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: 50Constant arrival rate with no more than 50 concurrent VUs:
phases:
- duration: 300
arrivalRate: 10
maxVusers: 50Ramp 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: 20A pause:
phases:
- pause: 60For more info you can access Artillery Docs.