junit5-system-exit icon indicating copy to clipboard operation
junit5-system-exit copied to clipboard

Code coverage does not accept the tests as coverage

Open fbushman opened this issue 4 years ago • 3 comments

I wrote a simple test of a main function system exit call. However, my JaCoCo code coverage does not say it is covered by tests. I'm using the @ExpectSystemExitWithStatus tag.

fbushman avatar Nov 16 '21 09:11 fbushman

Is there something that can be added to this code, that JaCoCo can pick up on for coverage? Or is this something to be fixed/added to JaCoCo itself?

fbushman avatar Nov 16 '21 09:11 fbushman

I can do some research on this. I haven't run into this because I don't usually instrument my tests with coverage. Can you give me some details on your JaCoCo setup? What version of the build plugin and what you are using to build (maven, gradle, etc), and which version of the JaCoCo tool (if you set it).

Thanks for the report @fbushman!

tginsberg avatar Nov 20 '21 16:11 tginsberg

Same issue for me: Using Maven 3.8.6 and jacoco-maven-plugin:0.8.8.

Btw: Love your project!

mjechow avatar Jul 08 '22 17:07 mjechow