-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
Packages is N/A with cobertura report if test files is under one folder #66
Comments
Seeing this as well! 👍 |
@amerryma @flyHe I'm not too familiar with the cobertura test reporter. Would either of you be able to provide an example repo that reproduces this issue? ideally with expected output, vs. observed output? At which point, happy to start digging into the issue (or to accept any patches you make to address the issue, if you feel like doing some digging yourselves). |
@bcoe I have created an example repo in https://github.com/flyHe/testSample |
@flyHe thank you I appreciate the sample repo; if anyone beats me to it, would love help digging into the underlying issue with the cobertura reporter. |
I can get a valid cobertura,xml report generated by commenting out these lines:
this seems to confirm @JaKXz's statement from the nyc issue
I'm not sure the history of why those statements are there. It seems to me weird that the |
I am facing similar issue (using nyc though). Scenario1 I tested: Package.json:
Scenario2 I tested: After I tested multiple other approaches, in my case root cause of issue is excluding spec files in test, I don't want the coverage report of test files in report. |
Is there an update on this issue? |
seeing same behavior with this repo |
Would someone here be willing to try to contribute a failing test in a PR? :) that would get the ball rolling quickly |
Is it possible to implement the fix from #14 here? |
This is a really hideous and subtle issue. thought i'd try to kick fixing it into gear. |
@coderica very much appreciate the help digging into this 👍 |
Fixed in #382 |
@coreyfarrell this issue should be reopened since it has not been resolved 😞 |
Sure just be aware it is up to the community to provide a patch for this issue, istanbuljs maintainers are unable to provide a fix. |
@coreyfarrell Thanks for the last comment. I'm just hitting this problem now and found this issue 66. I'm not sure what you mean,
Do you think this issue can be fixed in this repo, or are you recommending that it be fixed upstream? |
It's an issue of knowledge, istanbuljs maintainers do not know what should be produced by the Cobertura report. I suspect the issue is in this repository, specifically in https://github.com/istanbuljs/istanbuljs/blob/master/packages/istanbul-reports/lib/cobertura/index.js. |
Thanks for the quick and helpful clarification. |
moved from istanbuljs/nyc#598 (comment)
Please use the template provided below, when reporting bugs:
Expected Behavior
Packages should be 100% with cobertura report if test files is under one folder
The right cobertura xml file should be as below (generated by istanbul directly):
Observed Behavior
Packages is N/A with cobertura report if test files is under one folder
Bonus Points! Code (or Repository) that Reproduces Issue
Forensic Information
Operating System: OS X Sierra 10.12.5
Environment Information: node 6.10.3, npm 3.10.10
The text was updated successfully, but these errors were encountered: