Feature
testcafe provide a way to take screenshot
a callback function or similar which check if test/assertion/action fails and take screenshot
You can use -S flag to take screenshots on failures.
-S, --screenshots-on-fails
Takes a screenshot whenever a test fails. Screenshots are saved to the directory specified by using the -screenshots <path> option.
For example, the following command runs tests from the sample-fixture.js file in all browsers, takes screenshots if tests fail, and saves the screenshots to the screenshots directory.
testcafe all tests/sample-fixture.js -S -s screenshots
very good :)
This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.
Most helpful comment
You can use -S flag to take screenshots on failures.