Skip to content

Conversation

@Strohgelaender
Copy link
Contributor

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 retryOnStatusCodeFailure to 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: false we 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

  • Code Review 1
  • Code Review 2

Screenshots

grafik

@github-actions github-actions bot added tests cypress Pull requests that update cypress tests. (Added Automatically!) labels Jul 22, 2023
@Strohgelaender Strohgelaender requested a review from TheZoker July 22, 2023 08:39
@Strohgelaender Strohgelaender marked this pull request as ready for review July 22, 2023 08:39
@Strohgelaender Strohgelaender requested a review from a team July 22, 2023 08:39
@Strohgelaender Strohgelaender added this to the 6.4.0 milestone Jul 22, 2023
Copy link
Contributor

@pal03377 pal03377 left a 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.

Copy link
Contributor

@TheZoker TheZoker left a 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 👍

@Strohgelaender Strohgelaender modified the milestones: 6.4.0, 6.3.7 Jul 24, 2023
@krusche krusche modified the milestones: 6.3.7, 6.3.8 Jul 24, 2023
@krusche krusche changed the title Development: Speedup cypress tests Development: Speedup cypress e2e tests Jul 25, 2023
@krusche krusche merged commit 8e9948c into develop Jul 25, 2023
@krusche krusche deleted the test/cypress-delay branch July 25, 2023 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cypress Pull requests that update cypress tests. (Added Automatically!) ready for review tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants