Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Exclude some files from the coverage total #70

Closed
denevell opened this issue Dec 2, 2013 · 7 comments
Closed

Exclude some files from the coverage total #70

denevell opened this issue Dec 2, 2013 · 7 comments
Labels

Comments

@denevell
Copy link

denevell commented Dec 2, 2013

Let's say I have the files below in the same source tree

com.example.entitites.SimplePojo
com.example.something.SomethingTests

I don't want eclemma to include those files in what needs to be covered tested.

I have seen the 'excludes' preference in Eclipse, but placing classes in such do not remove them from the coverage total: in the coverage window they still appear, as 0% and their code still highlighted red (even if they were partly green before.)

Is it possible to exclude classes from what needs to be covered by tests?

@marchof
Copy link
Member

marchof commented Dec 3, 2013

No, you can't include single classes with EclEmma. The scope can be determined on source folder level only.

@marchof marchof closed this as completed Dec 3, 2013
@rtack
Copy link

rtack commented Apr 10, 2015

Shouldn't this website be updated then? http://www.eclemma.org/userdoc/preferences.html

It says
Excludes: A list of class names that should be excluded from execution analysis. The list entries are separated by a colon (:) and may use wildcard characters (* and ?). (Default: empty)

@marchof
Copy link
Member

marchof commented Apr 10, 2015

If you read on the page says:

Warning: Use these options with caution! Invalid entries might break the code coverage launcher. Also do not use these options to define the scope of your analysis. Excluded classes will still show as not covered.

@monism
Copy link

monism commented Jan 11, 2017

Hi All,

I am trying to exclude a class that i know have coverage in it. Once i put that to the excludes preference, on a new coverage run they'll still be there in the coverage window, but they'll come up as 0% and will all be in red.

Is there a solution which to solve this , i need to exclude a class and not be showing in report at all

@marchof
Copy link
Member

marchof commented Jan 11, 2017

@monism Check my last comment I posted here. This is how the option is designed. EclEmma does not support exclusion of individual classes from the report.

@monism
Copy link

monism commented Jan 11, 2017

@marchof so there is no way now. i can exclude the classes as i have jacoco.exec and html file report, can you just help me in solving this

@marchof
Copy link
Member

marchof commented Jan 11, 2017

@monism Please do not post to closed issues. Our mailing list is a great place to ask general questions: https://groups.google.com/d/forum/jacoco

@jacoco jacoco locked and limited conversation to collaborators Jan 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants