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

OpenCover-flavored output does not match the actual OpenCover output #79

Closed
saxonww opened this issue Mar 28, 2018 · 7 comments
Closed

Comments

@saxonww
Copy link

saxonww commented Mar 28, 2018

EDIT: I didn't see that this had already been addressed.

I'm looking at MiniCover to replace OpenCover in a CI workflow. I am currently rewriting the OpenCover reports to Cobertura format for use with the Jenkins Cobertura plugin, using an OpenCoverToCoberturaConverter tool.

The MiniCover opencoverreport produces report output that doesn't really look like output produced by OpenCover, and the OpenCoverToCoberturaConverter tool can't process it. In particular, MiniCover produces a report which:

  • has an xsl-stylesheet declaration instead of xml
  • does not contain source elements (Class, File, Method, etc.) as children of parent elements (Classes, Files, Methods, etc.)
  • does not have complexity or coverage metrics on Method elements
  • does not have any Summary elements

I have not found a DTD for OpenCover, but there's an example report at https://github.com/sawilde/opencover/blob/master/samplexml/opencovertests.xml which I think they use for unit tests.

@saxonww saxonww closed this as completed Mar 28, 2018
@lucaslorentz
Copy link
Owner

Was it completely addressed?
From the top of my head I know some items was addressed, but I don't remember anything about Summary Elements and other things.
It turns out those not addressed things are not necessary for some tools. Maybe it's not necessary for that converter either.

@saxonww
Copy link
Author

saxonww commented Mar 28, 2018

I'm not sure yet. The newest couple of builds are throwing a new error "Common Language Runtime detected an invalid program" with some of my tests. It's only happening when instrumentation is active so I think it's a MiniCover thing; I am trying to track down which build introduced this and will open a separate issue.

@bhugot
Copy link
Contributor

bhugot commented Mar 28, 2018

did you tried the last one?

@bhugot
Copy link
Contributor

bhugot commented Mar 28, 2018

because it's something about instrumentation. I hope last version fixed them all but not sure

@saxonww
Copy link
Author

saxonww commented Mar 28, 2018

I tried the most recent one 2.0.0-ci-20180328123752. The problem I'm seeing seems to have come in with 2.0.0-ci-20180325225037, which I am guessing was built from a297e00; when I run instrument with the build immediately prior to that I get an exception. When I use 2.0.0-ci-20180321193925 I can run tests without error; this one I think matches 2e3c8d0 which fixed the opencover schema.

The OpenCoverToCoberturaConverter util works against this OpenCover report. I haven't run it through Jenkins to see what the report actually looks like, but there are no errors and the output file looks reasonable so I think this issue has indeed been solved.

@bhugot
Copy link
Contributor

bhugot commented Mar 28, 2018

could you look at the code where you have those Common Language Runtime and share with me the code that is inpacted

@saxonww
Copy link
Author

saxonww commented Mar 28, 2018

I opened #80 for this CLR issue since it's not really related to OpenCover reports

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