Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(load): add k6 load test workflow with example test #1186

Merged
merged 1 commit into from Jun 30, 2022

Conversation

sethidden
Copy link
Contributor

cherrypick #1182 to main aswell

This commit adds a GitHub Actions workflow (you have to *manually*
trigger it) that uses the K6 load testing utillity to run tests on a
given environment.

I had to add the `K6_API_TOKEN` secret to GitHub to allow running the
tests in K6's cloud (VSF has a paid plan). You can also run the test on
GitHub's agent though.

M2-899

fix: use js, not ts file

chore: partially revert #1107

This reverts commit 9b8de85.

This change was made because K6 recorded tests are gigantic when
customQuery sends the GraphQL AST in the request body. After this
change, this the request is sent in string form, but is converted into
GraphQL AST on the middleware side (because Apollo GraphQL client
expects AST (DocumentNode TS type), not string)

test(load): improve gql requests

refactor: fix newlines
@sethidden sethidden changed the title test(load): add K6 load test workflow with example test test(load): add k6 load test workflow with example test Jun 30, 2022
@sethidden sethidden merged commit b7cc0a1 into main Jun 30, 2022
@sethidden sethidden deleted the M2-899-cherrypick-k6 branch June 30, 2022 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants