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

Change the way "Run All Specs" are run in Interactive Mode (from the GUI) #1586

Open
brian-mann opened this issue Apr 15, 2018 · 8 comments
Open
Labels
Epic Requires breaking up into smaller issues pkg/desktop-gui This is due to an issue in the packages/desktop-gui directory pkg/reporter This is due to an issue in the packages/reporter directory pkg/runner This is due to an issue in the packages/runner directory pkg/server This is due to an issue in the packages/server directory stage: proposal 💡 No work has been done of this issue type: feature New feature that does not currently exist

Comments

@brian-mann
Copy link
Member

This comes from this epic... #681

All other stories were complete except this section...

Interactive Mode

  • Continue enabling users to "Run all Tests"
  • Enable clicking folders to automatically run a subset of specs
  • Instead of killing the renderer process between specs the browser will simply be "navigated" to the next spec URL.
  • This will isolate each spec, and be much faster and less abrupt than killing the renderer like we will for the CLI. However this makes sense considering Cypress already has the code for swapping the URL and rehydrating the state of the reporter. We already do this when swapping domains in a cy.visit.
  • Isolating specs will help with memory exhaustion, but its still possible to blow out on a very long and intense spec file.
  • To solve this we'll begin purging snapshots by reducing the default minimum of 50, down to 5.
  • Purged snapshots will only affect passing tests and we will not purge data for failing tests. This will enable users to review the commands and output for failed tests - as they likely don't care about the data for passing tests anyway.
  • We'll need to add a good user experience / messaging around why snapshots were purged
  • When running multiple specs we'll add the spec file as part of the command log which will give you a shortcut for focusing in on a spec file.

@jennifer-shehane we'll need you to comp some UI changes related to communicating to the users about running too many tests in Interactive Mode.

This should include a banner saying: "It looks like you're trying to run all tests in Interactive Mode. To prevent crashes slowdowns we are turning off interactive snapshots and debugging features."

@derfred
Copy link

derfred commented May 15, 2018

I have a question about this point:

  • To solve this we'll begin purging snapshots by reducing the default minimum of 50, down to 5.

Is there an API/config setting to do this in the current version?

@brian-mann
Copy link
Member Author

brian-mann commented May 15, 2018

Yes its numTestsKeptInMemory

https://on.cypress.io/configuration#Global

@jennifer-shehane jennifer-shehane added pkg/desktop-gui This is due to an issue in the packages/desktop-gui directory stage: ready for work The issue is reproducible and in scope pkg/server This is due to an issue in the packages/server directory external: documentation pkg/reporter This is due to an issue in the packages/reporter directory pkg/runner This is due to an issue in the packages/runner directory and removed stage: proposal 💡 No work has been done of this issue labels May 15, 2018
@jennifer-shehane jennifer-shehane added the type: feature New feature that does not currently exist label Jan 24, 2019
@jennifer-shehane jennifer-shehane added the Epic Requires breaking up into smaller issues label Mar 14, 2019
@jennifer-shehane
Copy link
Member

jennifer-shehane commented Jun 3, 2019

Comp for:

  • Explaining that/why snapshots are disabled (with link to docs).
  • List spec file within command log

@brian-mann mentioned maybe adding a tooltip message when you hover over the commands, since you are likely trying to snapshot if you're hovering.

snapshot-disabled-file-in-command

@jennifer-shehane
Copy link
Member

Added a tooltip in the style we have tooltips today.

snapshot-disabled-tooltip

@cypress-bot cypress-bot bot added stage: work in progress and removed stage: ready for work The issue is reproducible and in scope labels Jun 4, 2019
@jennifer-shehane jennifer-shehane changed the title Change the way "All Tests" are run in Interactive Mode (from the GUI) Change the way "All Specs" are run in Interactive Mode (from the GUI) Jul 15, 2019
@jennifer-shehane jennifer-shehane changed the title Change the way "All Specs" are run in Interactive Mode (from the GUI) Change the way "Run All Specs" are run in Interactive Mode (from the GUI) Sep 18, 2019
@cypress-bot cypress-bot bot added stage: proposal 💡 No work has been done of this issue and removed stage: work in progress labels Jul 13, 2020
@sergeyblohin
Copy link

@jennifer-shehane

Do I understand correctly that you will soon alter the behaviour of cypress open and cypress run in such a way that cypress open will behave like cypress run?

After that, will we lose the ability to run before hook really once before all tests?

@vegerot
Copy link

vegerot commented Mar 15, 2021

What is the status of this issue? This is a blocker for the cypress-image-snapshot library we would like to implement in our codebase

@JasonFairchild
Copy link

This seems like a really good improvement. Especially the running a subset of specs by folder and not killing the browser unnecessarily in open mode. So here is a +1 from me.

@senpl
Copy link

senpl commented Mar 6, 2023

Turning off test isolation fix issue in my test setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic Requires breaking up into smaller issues pkg/desktop-gui This is due to an issue in the packages/desktop-gui directory pkg/reporter This is due to an issue in the packages/reporter directory pkg/runner This is due to an issue in the packages/runner directory pkg/server This is due to an issue in the packages/server directory stage: proposal 💡 No work has been done of this issue type: feature New feature that does not currently exist
Projects
None yet
Development

No branches or pull requests

7 participants