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

Hide passing tests from output #30827

Open
OldStarchy opened this issue Jan 7, 2025 · 3 comments
Open

Hide passing tests from output #30827

OldStarchy opened this issue Jan 7, 2025 · 3 comments
Labels
stage: awaiting response Potential fix was proposed; awaiting response

Comments

@OldStarchy
Copy link

What would you like?

Only see information about tests that failed.

Why is this needed?

We've only got a few tests spread over 25 or so files, when one of them fails in the middle it's a pain to scroll through the log and find which one failed and what the error message was.

If a test is passing I don't need to know about it, but the log is flooded with these. I haven't run into the terminal buffer limit yet but I expect it won't take long to get there.

Other

The closest existing issues I could find were #7693 and #30078 but these not the same.

I have tried the --quiet option and while this does reduce the amount logged it does not solve the problem.

The script I am using is "cypress run --component --quiet --browser chrome".

Alternatively, detail about the failed tests could be moved to the end of the log once all tests are finished. That way no scrolling would be required and no information is hidden from the log.

@jennifer-shehane
Copy link
Member

@OldStarchy To be clear, you are wanting the output in the terminal to not show passing tests? As opposed to the 'open mode' UI?

Maybe one of the reporter plugins: https://docs.cypress.io/app/plugins/plugins-list#reporting or a custom reporter might meet your needs: https://docs.cypress.io/app/tooling/reporters

@jennifer-shehane jennifer-shehane added the stage: awaiting response Potential fix was proposed; awaiting response label Jan 7, 2025
@OldStarchy
Copy link
Author

I'm new to cypress so there might be a workflow I'm unaware of, so maybe a reporter plugin is the correct answer.

My intention is for during development I can see a failing test, fix it, then when I save it re-runs and then the next error appears (or if I'm unlucky, the same one again).

For this workflow to "flow" the error needs to be easily visible if not already visible, and for an ever-scrolling terminal output this means having all the errors at the bottom.

By "open mode" I guess you mean with the cypress window open? It's fancy but I feel there are benefits to keeping it all within the confines of vscode's editor and terminal for this kind of iteration.

Does that make sense?

@jennifer-shehane
Copy link
Member

@OldStarchy By 'open mode' I mean running cypress open and opening the tests in a browser so that you can see the tests run alongside your application under test. That's typically the workflow we recommend for TDD'ing E2E tests. It replaces your having a separate window up with localhost of your app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: awaiting response Potential fix was proposed; awaiting response
Projects
None yet
Development

No branches or pull requests

2 participants