dashingrocket / simplecov-cobertura

Ruby SimpleCov Cobertura Formatter
Apache License 2.0
54 stars 38 forks source link

branch coverage support #17

Closed skcc321 closed 2 years ago

skcc321 commented 3 years ago

I see no support for branch coverage in the readme. But I would like to start the process of implementation of that one somehow. according to cobertura documentation - branch coverage is supported. https://www.baeldung.com/cobertura#2-configuring-code-coverage-calculation-and-checks simplecov supports branch coverage as well https://github.com/simplecov-ruby/simplecov#branch-coverage-ruby--25

let's implement that one finally :)

jessebs commented 3 years ago

Great find. Is that something you'd want to take up?

skcc321 commented 3 years ago

probably. but not sure how soon...

ms-ati commented 3 years ago

Can anyone provide guidance on how to implement branch coverage, please?

skcc321 commented 3 years ago

I think this might be an example https://github.com/leobalter/testing-examples/blob/master/solutions/3/report/cobertura-coverage.xml how it should look like.

klausbadelt commented 3 years ago

Istanbul reports branches like this:

<line number="38" hits="59" branch="true" condition-coverage="100% (2/2)"/>

Has anyone picked this up yet? I might have a go otherwise.

jessebs commented 3 years ago

As far as I am aware, no one has picked this up

skcc321 commented 3 years ago

nobody....

skcc321 commented 3 years ago

something like this https://github.com/dashingrocket/simplecov-cobertura/pull/20

jessebs commented 2 years ago

Thank you for the work on this and I'm sorry for the delay. This is merged in and will be released as part of 2.0.0