Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cucumber html report showing incorrect metrics and attached images #1034

Closed
3 tasks
ijaved opened this issue Jun 14, 2023 · 3 comments
Closed
3 tasks

Cucumber html report showing incorrect metrics and attached images #1034

ijaved opened this issue Jun 14, 2023 · 3 comments

Comments

@ijaved
Copy link

ijaved commented Jun 14, 2023

Current behavior

Currently, only failed screenshots are attached in the html report and I am looking to also add screenshots to passing scenarios. I have added an After hook to take a screenshot for passing tests and the Cypress screenshotOnFailure is default to true which will take a screenshot for failing scenarios as the After hook is skipped in failed tests. In the example, there are 2 tests in the feature file one fails and the other passes. The html report shows this as 1 FAILED and 1 SKIPPED with 0% passed. The failed test has attached images for both tests and the passing test has the correct image attached.

image

Desired behavior

Cucumber html report should show correct metrics for passing/failing tests along with a single attached image

Reproduce issue

Added example to: https://github.com/ijaved/cypress-cucumber-preprocessor-reporting-example/tree/main

Versions

  • Cypress version: 14.14.0:
  • Preprocessor version: 18.0.0:
  • Node version: 16.16.0:

Checklist

  • I've read the FAQ.
  • I've read instructions for logging issues.
  • I'm not using cypress-cucumber-preprocessor@4.3.1 (package name has changed and it is no longer the most recent version, see #689).
@badeball
Copy link
Owner

Hey, and thanks for reporting this issue. You need to provide a minimal, reproducible example issues that illustrates the issue.

@ijaved
Copy link
Author

ijaved commented Jun 14, 2023

@ijaved ijaved changed the title Cucumber html report showing incorrect metrics and attached images to test Cucumber html report showing incorrect metrics and attached images Jun 14, 2023
@badeball
Copy link
Owner

I've fixed and released this as v18.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants