-
Notifications
You must be signed in to change notification settings - Fork 105
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
Add option to attach screenshot #36
Comments
Would love this too - @Hazyzh any ideas on if/when this could/can be implemented? |
good idea! need to think more about how to implement this feature. just add this to milestone 2.x. |
Same as #37, this reporter just to display the data that we got form Jest, and we can not add any custom data to test results. I can provide a method to save images, but the key point is how to relate that image to the corresponding test case. |
From Jest source code I found that there is a global variable when really running a test which stores the base information of the test. I can got file path and test full name from it, then combine it to our test result. This is a hack way that may not stable, but can not find another better way now. |
New version (2.0.0) released. You can have a try now. |
Amazing - great idea, thanks for providing! |
Works perfectly! Thanks a lot! |
Is there a way to attach html instead of a screenshot? |
Not support currently. maybe we can support it if it is a common use case. |
This would be great, but maybe call it attachAsset and make it possible to add more than one |
Hey, I'm using the Detox library to test my React Native app. Detox automatically saves screenshots, videos, and logs of failed tests inside the artifacts folder. The file structure looks like this:
and under that I got this files I want to attach all screenshots, the video file, and the log file to the Jest HTML report. Here’s my current Jest configuration:
|
Is your feature request related to a problem? Please describe.
The reporter is really good but I miss the option to add an screenshot or any other support file if something fails or to clarify the test report.
Describe the solution you'd like
reporter.currentTest.attach(file);
Where file an be image or text.
The text was updated successfully, but these errors were encountered: