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

Unable to run the Code Coverage Report with cypress 9.7.0 & cucumber #25223

Closed
anchalbhanwala opened this issue Dec 20, 2022 · 5 comments
Closed
Assignees

Comments

@anchalbhanwala
Copy link

Current behavior

I am unable to generate the coverage report data in cypress(9.7.0) . As suggested in the cypress docs & git https://github.com/cypress-io/code-coverage , i have updated the index files , support files but on running the command
npx nyc report --reporter=text-summary , i see below
image

The code is compiled successfully , test runs as expected but the coverage report shows unknown.

Desired behavior

The coverage report should fetch the data received on running the test and should show the report.

Test code to reproduce

cypress > support > index.js
import '@cypress/code-coverage/support';

cypress > plugins > index.js
_module.exports = (on, config) => {
require('@cypress/code-coverage/task')(on, config)

// add other tasks to be registered here

// IMPORTANT to return the config object
// with the any changed environment variables
return config
}_

command using to run the test
For compilation - ng serve
To run test as below
"test": "npm run cy:test2 || npm run deletexml && npm run posttest ",
"cy:test2": "npx cypress run --headed --spec 'cypress/integration/features/*.feature' ",
"posttest": "allure generate allure-results --clean -o allure-report && allure open",

Cypress Version

9.7.0

Node version

v16.14.2

Operating System

windows 10

Debug Logs

No response

Other

No response

@anchalbhanwala anchalbhanwala changed the title Unable to run the Code Coverage Report with cypress 9.7.0 Unable to run the Code Coverage Report with cypress 9.7.0 & cucumber Dec 21, 2022
@lmiller1990
Copy link
Contributor

What version of the code-coverage and the cucumber plugin are you on?

  • v2 -> Cypress 9.x
  • v3 -> Cypress 10.x

Please share your package.json so I can ensure I'm using the same version of dependencies as you are. A minimal reproduction would help speed up debugging, so if you could include a repo, that'd be great, too.

@anchalbhanwala
Copy link
Author

Hi , i am using
v2 -> Cypress 9.7.0
"cypress-cucumber-preprocessor": "^4.3.1"
Package.json
image
image
image

I cannot share the repo as its organizations repo , but sharing the folder structure that i am using. I am using Cypress-Cucumber framework .
image

@lmiller1990
Copy link
Contributor

I'm not sure if you can, but updating to Cy 12 and the new version of the cucumber plugin (v15) find here might help.

If you can't, check this issue: badeball/cypress-cucumber-preprocessor#198. Someone else had a similar problem.

Try seeing what they did. If you can't get it working in a fresh repo, please upload the repo anyway, and I can take a look. I don't have the bandwidth to create a minimal reproduction for a third party plugin right now, but if you can put one together, I can take a look. Thanks!

@nagash77 nagash77 assigned astone123 and unassigned lmiller1990 Jan 9, 2023
@astone123
Copy link
Contributor

@anchalbhanwala were you able to try upgrading to Cypress 12 and cucumber plugin v15? Also, like Lachlan said, a repo would help us debug. Thanks

@astone123
Copy link
Contributor

Unfortunately we have to close this issue due to inactivity. Please comment if there is new information to provide concerning the original issue and we can reopen.

@astone123 astone123 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 17, 2023
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

3 participants