cypress-cucumber-preprocessor icon indicating copy to clipboard operation
cypress-cucumber-preprocessor copied to clipboard

Feature request: Add videos to Cypress' cucumber reports

Open jessica-jorgenson opened this issue 1 year ago • 2 comments
trafficstars

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

jessica-jorgenson avatar Dec 15 '23 21:12 jessica-jorgenson

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.

badeball avatar Dec 16 '23 10:12 badeball

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.

badeball avatar Dec 16 '23 10:12 badeball