-
-
Save dennmart/a9afde0d3684a396b6f74225a754baf9 to your computer and use it in GitHub Desktop.
Artillery tests for cloud service provider comparisons (Dev Tester article: Leaving Heroku: Which Provider Should You Choose?)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| config: | |
| target: [API URL] | |
| phases: | |
| - duration: 60 | |
| arrivalRate: 1 | |
| rampTo: 5 | |
| name: Warm up phase | |
| - duration: 60 | |
| arrivalRate: 10 | |
| rampTo: 25 | |
| name: Ramp up load | |
| - duration: 60 | |
| arrivalRate: 25 | |
| rampTo: 50 | |
| name: Spike phase | |
| scenarios: | |
| - flow: | |
| - get: | |
| url: "/airports" | |
| capture: | |
| - json: "$.data[{{ $randomNumber(1, 15) }}].id" | |
| as: "airportId1" | |
| - json: "$.data[{{ $randomNumber(16, 30) }}].id" | |
| as: "airportId2" | |
| - post: | |
| url: "/airports/distance" | |
| json: | |
| from: "{{ airportId1 }}" | |
| to: "{{ airportId2 }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| config: | |
| target: [API URL] | |
| payload: | |
| path: "users.csv" | |
| fields: | |
| - "username" | |
| - "password" | |
| phases: | |
| - duration: 60 | |
| arrivalRate: 1 | |
| rampTo: 5 | |
| name: Warm up phase | |
| - duration: 60 | |
| arrivalRate: 5 | |
| rampTo: 10 | |
| name: Ramp up load | |
| - duration: 30 | |
| arrivalRate: 10 | |
| rampTo: 20 | |
| name: Spike phase | |
| scenarios: | |
| - flow: | |
| - post: | |
| url: "/tokens" | |
| json: | |
| email: "{{ username }}" | |
| password: "{{ password }}" | |
| capture: | |
| - json: "$.token" | |
| as: "authToken" | |
| - get: | |
| url: "/airports" | |
| qs: | |
| page: "{{ $randomNumber(1, 200) }}" | |
| capture: | |
| - json: "$.data[{{ $randomNumber(1, 29) }}].id" | |
| as: "airportId" | |
| - post: | |
| url: "/favorites" | |
| headers: | |
| Authorization: "Bearer {{ authToken }}" | |
| json: | |
| airport_id: "{{ airportId }}" | |
| capture: | |
| - json: "$.data.id" | |
| as: "favoriteId" | |
| - delete: | |
| url: "/favorites/{{ favoriteId }}" | |
| headers: | |
| Authorization: "Bearer {{ authToken }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| test-user-1@dev-tester.com | testuserpass1 | |
|---|---|---|
| test-user-2@dev-tester.com | testuserpass2 | |
| test-user-3@dev-tester.com | testuserpass3 | |
| test-user-4@dev-tester.com | testuserpass4 | |
| test-user-5@dev-tester.com | testuserpass5 | |
| test-user-6@dev-tester.com | testuserpass6 | |
| test-user-7@dev-tester.com | testuserpass7 | |
| test-user-8@dev-tester.com | testuserpass8 | |
| test-user-9@dev-tester.com | testuserpass9 | |
| test-user-10@dev-tester.com | testuserpass10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment