-
Notifications
You must be signed in to change notification settings - Fork 349
Development: Speedup cypress e2e tests
#6960
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
Conversation
…st/cypress-delay
…st/cypress-delay
pal03377
left a comment
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.
Thanks for this improvement! 🏎️ Code changes look good & E2E tests still pass.
I have one additional suggestion that might improve the speed even a slight bit more below, but if that does not work I'm also happy with the current changes.
TheZoker
left a comment
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.
Changes look good to me 👍
Development: Speedup cypress testsDevelopment: Speedup cypress e2e tests
Checklist
General
Motivation and Context
The cypress tests are quite long-running, which leads to a large bamboo queue.
Description
This PR reduces the runtime by about 10 minutes by doing the following:
Deleting a course sometimes fails due to some scheduled work on the server. Instead of waiting for constant 20 seconds, we wait a short period and use
retryOnStatusCodeFailureto submit another request in case the request failed.By wrapping login attempts into a
cy.session()call, the created authorization token gets saved and can get reused in later tests. We don't need to use and test the login endpoint every time.With
testIsolation: falsewe no longer restart the browser between every test, leading to better runtime and (in my opinion) more realistic tests since the user also does not restart the browser before every action.Steps for Testing
code review
Review Progress
Code Review
Screenshots