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

feat: allow to rerun only failed tests (ui) #29587

Closed
wants to merge 3 commits into from

Conversation

tiago80673
Copy link
Contributor

Additional details

  • Why was this change necessary?
    This change allows users to rerun large datasets more efficiently by skipping tests that have already been passed, thereby saving significant time.
  • What is affected by this change?
    The Cypress UI and app-runner.
  • Any implementation details to explain?
    Before the runner aborts its current run, it gathers information about which tests passed during the run. This data is then saved and can be used to skip those tests in subsequent runs (by forcing test.pending to true, similar to what it.skip does).
    Ideally, this information would be saved to a file on the user's system. However, due to some issues we've encountered, the current implementation stores this data in a window variable instead.

Steps to test

Open Cypress and click on the new red button next to the old rerun tests button

How has the user experience changed?

final

PR Tasks

@cypress-app-bot
Copy link
Collaborator

@tiago80673
Copy link
Contributor Author

I've marked this as a draft because we believe it would be more advantageous to save the information to a file. We've included the functions to accomplish this in packages/driver/src/cypress/utils.ts. However, we're uncertain whether it's the most appropriate location for them. Also, we encountered difficulties when attempting to import fs there as it was always set to null even after importing.
@jennifer-shehane

@tiago80673 tiago80673 closed this May 29, 2024
@tiago80673 tiago80673 reopened this May 29, 2024
@jennifer-shehane
Copy link
Member

Closing as stale.

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.

Allow to rerun only failed tests directly from the Test Runner UI
3 participants