Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

Show first error upon failing test #31

Open
baronvonbirra opened this issue Nov 5, 2019 · 12 comments
Open

Show first error upon failing test #31

baronvonbirra opened this issue Nov 5, 2019 · 12 comments
Assignees

Comments

@baronvonbirra
Copy link

Hi there!
We have our CI pipeline configured with CYPRESS_RETRIES: 2. In case the 3 of tries fail, just the last error is shown in the log; but is there a way to show all errors (the 3 errors, in our case)?

Thanks!

@kuceb
Copy link
Owner

kuceb commented Nov 5, 2019

@baronvonbirra hi, you're talking about the terminal reporter correct?

@samjeffress
Copy link

I think it'd be useful to have some terminal output so it's we can tell which jobs are retrying

@kuceb
Copy link
Owner

kuceb commented Nov 18, 2019

@samjeffress see #24

@baronvonbirra
Copy link
Author

baronvonbirra commented Nov 27, 2019

Hey @bkucera! Yes, I mean the terminal reporter, sorry!

The thing is, our scenarios sometimes fails (it could be a bug, it could be an issue after a change in the code, or even a timeout in the pipeline), and then they retry. But we have seen that sometimes, because of how our tests are designed, they fail in the retry because of another thing: for example, we are not expecting to see something that is going to be created later in that test, but as the 1st scenario has already created it before failing, it's already there and it fails. In this specific cases, it's not easy and first sight to spot what has really failed.

Not sure if my explanation was clear 😅 .

EDIT: I have just seen you added something new about the retries in the terminal yesterday; I'll take a look, as this looks just what I was looking for 😄 Many thanks!

@kuceb
Copy link
Owner

kuceb commented Nov 27, 2019

@baronvonbirra it could be sensible to hold onto the first error and if all retries fail, show that one instead of the last one. That way you'll most likely see the real failure.

@baronvonbirra
Copy link
Author

@bkucera yes, that's a good idea and totally fits our needs. Is there currently a way to achieve it? 🤔

By the way, I just upgraded to v.1.5.0 and introduced the retry logging, and it's really nice. If we could get the error log for the 1st fail as you say, we will be reaaaally happy. 😄

@kuceb kuceb self-assigned this Nov 27, 2019
@kuceb kuceb changed the title Show Error log for each retry Show first error upon failing test Nov 27, 2019
@psurana0329

This comment has been minimized.

@kuceb
Copy link
Owner

kuceb commented Dec 5, 2019

@psurana0329 this is off topic, please open an issue.

@psurana0329
Copy link

Do we know an eta for this? I am extremely interested in seeing the error for first failure too?

@gilgold

This comment has been minimized.

@kuceb
Copy link
Owner

kuceb commented Feb 28, 2020

@gilgold I didn't want to hack in emitting extra events to try to keep the surface area of this plugin small.

But, if you want to hack on top of this, you can handle the logRetry task this plugin adds as done here https://github.com/Bkucera/cypress-plugin-retries/blob/master/lib/plugin.js

@kuceb
Copy link
Owner

kuceb commented Feb 28, 2020

also, @gilgold off topic. please open an issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants