elvetemedve / behat-screenshot

This is an extension for Behat which provides debugging functionality by taking a screenshot of failed tests.
MIT License
92 stars 17 forks source link

Integration with Behat Cucumber Json Formatter #58

Closed marcelovani closed 1 year ago

marcelovani commented 1 year ago

Background

We use Behat Cucumber Json Formatter to send the test results to Cucumber Jenkins

Currently, it is not possible to attach screenshots to the reports.

This functionality is also mentioned here https://github.com/cawolf/behat-cucumber-formatter/issues/10

Proposal

Trigger an event when files are uploaded, to allow Cucumber Formatter to subscribe to the event and attach the image Url to the json output.

marcelovani commented 1 year ago

I did a POC that seems to work for my needs. It requires changes on both packages, see

https://github.com/elvetemedve/behat-screenshot/issues/58 https://github.com/cawolf/behat-cucumber-formatter/pull/12

marcelovani commented 1 year ago

PR Merged https://github.com/elvetemedve/behat-screenshot/pull/59