Last active
March 31, 2020 15:51
-
-
Save johnytiago/059bfd02abdc5f558434ba5c4d433143 to your computer and use it in GitHub Desktop.
This file contains 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
scenarios: | |
# Each virtual user created by Artillery will run one of the scenarios, | |
# randomly choosing one based on the weight attribute | |
- name: "Add song to an existing collection" | |
weight: 5 | |
flow: | |
- get: | |
# Defined on ./helpers.js, sets env specific auth headers | |
beforeRequest: "setAuthorizationHeaders" | |
url: "/v1/collections" | |
qs: | |
userId: "{{ userId }}" | |
# Your can utilised captured variables inside the scenario or in helper functions | |
capture: | |
- json: "$.id" | |
as: "collectionId" | |
- get: | |
beforeRequest: "setAuthorizationHeaders" | |
url: "/v1/saved_songs" | |
qs: | |
userId: "{{ userId }}" | |
capture: | |
- json: "$.id" | |
as: "songId" | |
- post: | |
beforeRequest: "setAuthorizationHeaders" | |
url: "/v1/item_connections" | |
json: | |
songId: "{{ songId }}" | |
collectionId: "{{ collectionId }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment