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

Are we have any way to prevent cypress clear memory between each test and log in again when I do "cypress run"? #9038

Closed
viengiang opened this issue Oct 30, 2020 · 2 comments

Comments

@viengiang
Copy link

viengiang commented Oct 30, 2020

Current behavior

Hi guys, first thing, I want to thanks for your work.

I having a problem: My project has multiple test cases that need to test, so I don't want to log in again and again between each test case when I do "cypress run". Every time my test log in that will waste 20 seconds just for nothing. Are we have any way to prevent cypress clear memory between each test and log in again when I do "cypress run"?

Desired behavior

Keep login between each test when do "cypress run". Thanks a lot.

Versions

Cypress 5.5

@csvan
Copy link

csvan commented Nov 1, 2020

No, runs are isolated by design and you always get a clean session.

@jennifer-shehane
Copy link
Member

Each test file will relaunch the browser and start from a clean state, so that each file can be run isolated, especially when run in parallel. This is by design.

If you wanted to stay logged in within a singular test file across several 'it' definitions, you can preserve cookies or localStorage. Options for saving cookies: https://on.cypress.io/cookies. Options for saving localStorage here: #461

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

No branches or pull requests

3 participants