Kiranpal Juss
Kiranpal Juss

Reputation: 11

Attach screenshots to cucumber-html-report in cypress when the step fails?

I unfortunately can't seem to get this working, even though I have followed How I could attach screenshots to cucumber report in cypress when the step fails?

How can I resolve this?

I am using cypress-cucumber-processer and cucumber-html-reporter

Upvotes: 1

Views: 1485

Answers (1)

Aman Garg
Aman Garg

Reputation: 116

You can use Cytorus to write cucumber/gherkin tests using Cypress. This is how you can configure to see screenshot for failing steps in reports;

  1. Setup project using cytorus-boilerplate.
  2. This will also set up "cytorus-reporter".
  3. Open config/cucumberReport.js and change screenshot: false to screenshot: true. This will generate the report with screenshots for failing steps
  4. Now setup some report viewer tool like cucumber-html-reporter. Check this for configuration

Upvotes: 1

Related Questions