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

coverage? #47

Open
ExpandingMan opened this issue Oct 13, 2020 · 3 comments
Open

coverage? #47

ExpandingMan opened this issue Oct 13, 2020 · 3 comments

Comments

@ExpandingMan
Copy link

Hey guys. I have people at work asking me about outputting junit XML's for code coverage. Does anyone know what adding that would entail? The real obstacle that I see is that I don't think we have any way of parsing the gcov code coverage output files into a manageable Julia data structure. Let me know if you have any thoughts on this. (Or maybe the functionality is already here and Im' just not realizing it.)

@oxinabox
Copy link
Member

I don't think so.
I have no idea what junits XML for code-coverages is, but i can't see how it would be closely related to junit's XML for test pass/fail.

I suspect the place to look is Coverage.jl more precisely CoverageTools.jl.
PRobably you can workout a way to convert LCOV or something like that

@mmiller-max
Copy link
Member

I'm wondering if this is due to confusion about whether junit XMLs can actually be used for coverage as the schema doesn't seem to have anywhere to store coverage information, but it's easy to find lots of searches on the internet of people asking for it.

From a quick search it looks some people say you can do this wth jest in JavaScript (something like this) which I guess works as each testsuite in the report corresponds to a class, so you can add the coverage information for that class as an additional property attribute to that testsuite. However an issue in jest agrees that there isn't a specific section of the junit XML for coverage info, so without testing it I'm not sure what this output xml actually looks like.

Regardless of this, for us each testsuite is just a testset and therefore doesn't necessarily correspond to a chunk of code to measure coverage over, so there wouldn't be a way that made sense to include the coverage information for an individual testsuite.

Perhaps you could use an LCOV or convert it to a Cobertura xml? Is this for a specific CI platform?

@BambOoxX
Copy link

We just added a LCOV -> Cobertura converter in JuliaCI/LocalCoverage.jl#42. Maybe this could help.

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

4 participants