question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cobertura file not created despite out.json is

See original GitHub issue

Context

Hi, I have instrumented the code using the following command:

npx nyc instrument --compact=false src instrumented

and to be practical I have moved the instrumented folder into src (esier) and I have committed everything into the following repository: https://github.com/fasatrix/nyc-test-folder-outside-src

Please install both package.json. The one in the root and the other within the test folder

To run the tests use npm run cypress:run script

Current behavior:

Despite the out.json file has been create in .nyc_output, cobertura and other coverage types are being created empty

Desired behavior:

Cobertura and other coverage types should be created

Steps to reproduce: (app code and test code)

Just clone the repo, install dependencies, run the the app and the test

Additional Notes

If I use the standard configuration and keep the “Cypress” folder at the same level as the src one everything works fine (repo for reference below). However for the project project I am working on (These are demos with the structure as the actual project which is confidential) I am unable to use this working configuration as I need to keep all test types(performance, e2e, cross browsers eyc.) within the test folder

https://github.com/fasatrix/nyc-test-folder-inside-src

Versions

Win 10 Cypress 3.4

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
bahmutovcommented, Jan 6, 2021

I should move it to our code-coverage repo

Sent from my iPhone

On Jan 5, 2021, at 20:25, Fabio Santoro notifications@github.com wrote:

I couldn’t reproduce it because I ran it on Ubuntu. But I need to think about the cause and what tags I should use for this.

Apologies in advance but this sounds like a poor response from a company that promotes a product

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

1reaction
sainthkhcommented, Jan 6, 2021

I couldn’t reproduce it because I ran it on Ubuntu. But I need to think about the cause and what tags I should use for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cobertura coverage conversion from XML to JSON failed
I have tried running this on DevOps Windows and Ubuntu agents; The coverage XML file generated was by Jest's Cobertura generator; I have...
Read more >
Azure devops reportgenerator task can't find coverage ...
Just as the error message indicates, it needs the coverage.cobertura.xml but it's not found.(not generated!) In your script:
Read more >
Could not get any cobertura coverage info in SonarQube
No path issue though as if I use the generic coverage parameter, it chokes on ill formed xml. I may provide the coverage...
Read more >
Collecting code coverage in Azure Pipelines - Joachim Dalen
Tests are not only useful to ensure our code meets our functional expecations, ... Create a new file in the root of the...
Read more >
coverlet - Discover .NET
After the above command is run, a coverage.cobertura.xml file containing the ... a coverage.json file containing the results will be generated in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found