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

Adds report of test code with maven plugin by default. #94

Closed
wants to merge 1 commit into from

Conversation

two-pack
Copy link

JaCoCo maven plugin outputs coverage report with 'report' goal.
Now its report DOES NOT report coverage for test code.
Otherwise EclEMMA reports them.

I think test code coverage is needed to know if test code run enough.
So by default, as same as EclEMMA, I think they should include test code coverage.
If someone don't need them, they can use configuration of 'excludes' in 'report' goal.

@marchof
Copy link
Member

marchof commented Apr 24, 2013

I don't think it is common practice to look include the test coverage of the test case. This would blur the coverage figures of your actual production code (test code would typically show nearly 100% if executed). Therefore at least the default behavior shouldn't be changed.

EclEmma by default reports coverage on all files simply because there is no convention for Eclipse projects to locate test code.

@Godin
Copy link
Member

Godin commented Apr 25, 2013

I agree with @marchof . But maybe indeed should be possible to do this, however this should be realised as opt-in instead of opt-out. For example in IntelliJ IDEA there is an option to show coverage in code of tests, which is disabled by default.

@two-pack
Copy link
Author

Thanks replies :)

EclEmma by default reports coverage on all files simply because there is no convention for Eclipse projects to locate test code.

I created a sample code for jacoco's report. It has enough maven convention and the report is divided by package name space (not blur).
https://bitbucket.org/twopack/jacoco-sample
http://4.bp.blogspot.com/-ti_-sVQwWOs/UXOpGo0lt-I/AAAAAAAAPag/oNNh7p4D7zk/s1600/coverage4.png

I cannot judge its common or not. And I absolutely agree blur coverage is bad.
I'll try to change the request to opt-in style with default disabled. So this request is closed.

@two-pack two-pack closed this Apr 25, 2013
@two-pack
Copy link
Author

It has enough maven convention and the report is divided by package name space (not blur).

I'm sorry to miss understanding... I recognized reason of EclEmma by default reports coverage on all files.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants