-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Screenshot doesn't always capture error / failure details #1361
Comments
This is a known issue for awhile. It has to do with React (which is what we built the reporter in). The problem is that taking a screenshot is an async process. But React also renders async. To date - we acutally do synchronize taking a screenshot with React - but its in a shallow component and there is a chance the nested components have not rendered yet. The solution seems simple - wait until all the the UI parts have rendered right? The problem with that is that the longer we wait to take the screenshot the less accurate it will be when the state of your app fails. We're talking about milliseconds here - but those matter. The question is - would you rather have an accurate screenshot of the way your app looked when it failed? Or would you rather have a screenshot including the error in our reporter? It's unfortunately not possible to have both. |
The other thing worth mentioning here - is that this is why we capture both the error + stack, the screenshot, and the video in our dashboard. It's not enough to have just 1 of them - you need more context to really understand what's going on. |
We're working on reproducing this and having trouble. From your screenshot, it looks like there are more tests than in your example code. Could you post all the code you used to reproduce this? |
Hey, I know this does occur as I have seen it myself. We'll need a reproducible example to track down the exact issue though. Can anyone provide? |
Unfortunately we have to close this issue as there is not enough information to reproduce the problem. Please comment in this issue with a reproducible example and we will reopen the issue. 🙏 |
Current behavior:
We are using Cypress for testing an API E2E. The screenshots will explain better for me but basically when the test fails the screenshot does not wait long enough in order for the cypress UI to update the DOM with the error details.
Desired behavior:
Screenshots should contain error details
How to reproduce:
I just run the following test with
cypress run
basically:Additional Info (images, stack traces, etc)
Current:
![current](https://user-images.githubusercontent.com/342638/36517059-636f51a4-17b3-11e8-8189-89bc866839e4.png)
How it appears when the next test fails:
![how it appears when the next test fails](https://user-images.githubusercontent.com/342638/36517071-6ec1a642-17b3-11e8-988d-77b800575abe.png)
The text was updated successfully, but these errors were encountered: