## General steps
1. Install [Artillery (load testing tool)](https://www.artillery.io/docs/) via NPM
2. Create an `artillery-test.yml` file (see [docs](https://www.artillery.io/docs/guides/getting-started/writing-your-first-test#configuration)), defining following settings under top-level `config`:
- `target: {{processEnvironment.API_URL}}` (this will be substituted at runtime)
- Define 1+ `phases` which define the duration, ramp-up rate and final concurrency of the phases of a load test run
- Define a `payload` which allows a CSV file to be used as the input to the test run, supplying dynamic arguments to each test thread
3. Now define top-level `scenarios` in this config file. For each scenario, ensure to include:
- GraphQL query to be sent in the JSON body of the HTTP request
- Auth token in the HTTP header
- `expect` statements to verify that request didn't fail
4. Create Node.js script which generates the CSV input file to the test run. This will likely create test users (e.g. in Cognito) and authenticate them. The auth token and any other data that the tests may need (e.g. UserId) should be stored as columns in each CSV row.
---
## References
- [Load Testing video lesson in Chapter 11 of AppSync Masterclass course](https://theburningmonk.thinkific.com/courses/take/appsync-masterclass-premium/lessons/17386958-load-testing-the-appsync-api)