Hi Martin, this is not supported out of the box by JaCoCo. But we have the building blocks to create something like this.
* You need to hook into your test frameworks to tell test cases apart * Between each test case you need to trigger a exec file dump (or receive data via TCP) and reset probes No the hard parts start which I have no idea how this scales for large projects: For every test case (exec file) you create a coverage report. This can be in-memory only, no need to write HTML or XML to disk for this. From this you would need to create a gigantic matrix between your code base and the test cases. Maybe you can aggregate both a bit to keep the matrix in a reasonable size (e.g. only in Java module or package level). Regards, -marc Beside your scenario may I add my personal view on this: Code coverage should only be applied in white box testing (i.e. Unit Testing). This means there is a simple 1:1 mapping between test cases and code. Maybe not on method or class level, but at least on package or module level. That’s why I recommend to only count coverage within the module. Implicit coverage by using other modules must not be counted for white box test coverage. > On 21. Nov 2022, at 22:27, Martin Pokorny <[email protected]> wrote: > > Hi guys, > > Is there some way to see which test case or test script covers which line? > > Reason. We make in our company cpp coverage. We produce for each test suite > extra cov file. From this we extract a big json file with mapping which test > suite cover which file. This helps us to start test in feature branches > depending on changes. It decrease testing time rapidly with same code > quality. Otherwise must developer start all of our test which takes more > hours. And I want implement similar solutions for jenkins (as extra plugin). > In jenkins is used mvn and jacoco. > > So any tips? > > Thx > > Br Martin > > -- > You received this message because you are subscribed to the Google Groups > "JaCoCo and EclEmma Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jacoco/CAPUx_sXByvbS3F_0-ucjpQk93v3068COpeLtrxmU9sbv73Qy7Q%40mail.gmail.com > > <https://groups.google.com/d/msgid/jacoco/CAPUx_sXByvbS3F_0-ucjpQk93v3068COpeLtrxmU9sbv73Qy7Q%40mail.gmail.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/A6012157-9598-4D97-A65E-F1E69C79E391%40mountainminds.com.
