gotwarlost / istanbul

Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests and browser tests. Built for scale.
Other
8.7k stars 787 forks source link

Add support for Jacoco reports #782

Open jackson-chris opened 7 years ago

jackson-chris commented 7 years ago

We have a build pipeline setup in jenkins that consists of java and javascript code. We use jacoco to produce code coverage reports for our java code base. We also have javascript projects where we're using Karma to run our jasmine tests and produce code coverage reports. Instanbul currently supports output format cobertura which has a jenkins plugin. We currently must display two separate code coverage reports (one for java (jacoco) the other for javascript (cobertura)). It would be nice if we could have code coverage reports for our java code and javascript code in the same format so that we could merge them all into one report. Seeing that jacoco is the more popular code coverage tool for java these days I see many others having this same need.

Jacoco has published a DTD of their format.

adrianfalleiro commented 7 years ago

@blindenvy Do you know how jacoco calculates complexity?

jackson-chris commented 7 years ago

You can read all about it in their documentation: http://www.eclemma.org/jacoco/trunk/doc/counters.html

sivasadhu commented 7 years ago

+1

elgohr commented 7 years ago

+1

cguckes commented 7 years ago

+1

slk9 commented 7 years ago

+1

sschwenker commented 7 years ago

+1

ginamako commented 7 years ago

+1

fathergoose commented 7 years ago

+1

dejewi commented 6 years ago

+1

robcornelius commented 6 years ago

+1

mrvicadai commented 6 years ago

+1

mingz commented 6 years ago

+1

chintan-patel commented 6 years ago

+1

jfreitas2015 commented 6 years ago

+1

justinhorton3 commented 6 years ago

+1

webben-de commented 5 years ago

+1

subhamsaha commented 5 years ago

+1

ketanonline commented 5 years ago

I agree with @blindenvy We have even more complex Jenkins eco system having multiple technologies. Having multiple plugins for coverage purpose doesn't help in maintenance/reporting areas. It will be great to see jacoco format report. :)

bjuergens commented 3 years ago

besides jenkins, another use-case for jacoco-reports would be, that they can be consumed by webstorm. Or at least the official documentation implies that it does

[...] select the necessary .ic (IntelliJ IDEA runner) or .exec (JaCoCo runner) file [...]

https://www.jetbrains.com/help/idea/switching-between-code-coverage-suites.html#add-remove-coverage-suite