-
Notifications
You must be signed in to change notification settings - Fork 3
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: Automatic GQL performance regression tests #1337
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering if we could not have the k6 commands as part of our usual tests done via jest (maybe using k6 programmatically) ? This way we stay within our test framework, and maybe we would not have the intermediate step of generating the yml files ?
k6 run --tag testid=DataCubePreview --env ENV=PR --env ENDPOINT=${{ github.event.deployment_status.target_url }}/api/graphql --env CUBE_IRI=https://energy.ld.admin.ch/elcom/electricityprice --env CUBE_LABEL=Elcom - </root/k6/performance-tests/graphql/DataCubePreview.js && | ||
k6 run --tag testid=PossibleFilters --env ENV=PR --env ENDPOINT=${{ github.event.deployment_status.target_url }}/api/graphql --env CUBE_IRI=https://energy.ld.admin.ch/sfoe/bfe_ogd84_einmalverguetung_fuer_photovoltaikanlagen/9 --env CUBE_LABEL=Photovoltaikanlagen/9 - </root/k6/performance-tests/graphql/PossibleFilters.js && | ||
k6 run --tag testid=PossibleFilters --env ENV=PR --env ENDPOINT=${{ github.event.deployment_status.target_url }}/api/graphql --env CUBE_IRI=https://environment.ld.admin.ch/foen/nfi/nfi_C-20/cube/2023-3 --env CUBE_LABEL=NFI/2023-3 - </root/k6/performance-tests/graphql/PossibleFilters.js && | ||
k6 run --tag testid=PossibleFilters --env ENV=PR --env ENDPOINT=${{ github.event.deployment_status.target_url }}/api/graphql --env CUBE_IRI=https://energy.ld.admin.ch/elcom/electricityprice --env CUBE_LABEL=Elcom - </root/k6/performance-tests/graphql/PossibleFilters.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you extract this part to a script ? This way we have less reliance on github actions & we can run the script locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think still we would have problems to run it locally, as it references github.event.deployment_status.target_url
, right? Let me know if I missed something again 😅
@ptbrowne thanks for reviewing 🙇♂️ I am not sure if it's a good idea to have automatic PR performance tests in Let me know if I'm missing something, we can also sync on this 👀 |
Sorry I was unclear. I was meaning that we would put the test in jests but outside of the test suite required to pass, I think using the "projects" feature from jest would enable to have the main "project" being used for CI and another "performance-e2e" project that could be run only if we want it. I see the following advantages of using jest:
|
e49a0d6
to
30fc211
Compare
39ef604
to
51d0bb6
Compare
b23dbd4
to
e7f93dc
Compare
This PR introduces a first iteration of automatic GQL performance regression tests on successful deployment and consolidates the code related to GQL performance testing.