cypress-cucumber-preprocessor
cypress-cucumber-preprocessor copied to clipboard
Feature request: Add videos to Cypress' cucumber reports
Current behavior
When generating an HTML report, there is an attached image for screenshots for failing tests.
Desired behavior
When the Cypress has the config video: true, the HTML report should include the video attachment for passing or failing tests. (or just failing if this is enabled).
Similar to this issue here.
Versions
- Cypress version: ^13.3.0
- Preprocessor version: ^18.0.6
- Node version: 18.18.2
Checklist
- [x] I've read the FAQ.
- [x] I've read instructions for logging issues.
- [x] I'm not using
[email protected](package name has changed and it is no longer the most recent version, see #689).
Cucumber messages, which the json and html report are products of, is a well-defined (somewhat at least) protocol. Its notion of attachments is fairly limited and attachments can only really be tied to a step. In Cypress however, a video is logically tied to a file.
So, in order to add a video, one would have to decide which step to attach it to. And this isn't as straight forward as one might think. There can be multiple failed tests and steps in a file, which of them deserves the video attachment? Bear in mind, attachments can't refer to each other, so adding it to multiple steps would blow of the report size.
Attachments not tied to a specific step, but a test run has been discussed in the past, ref: https://github.com/cucumber/messages/pull/102 and https://github.com/cucumber/cucumber-js/issues/1394. I suspect this is the most (perhaps only) viable solution. However, I don't know if / when this will get merged. It would also take some work on https://github.com/cucumber/react-components to display test-run attachments.