Share

EclEmma - Java Code Coverage for Eclipse

Subscribe

Ignore AllTests test suite

  1. 2009-10-18 13:43:00 UTC

    Dear all,

    I've just discovered EclEmma and it works great. I have a JUnit 4 test suite which looks like this:

    import org.junit.runner.RunWith;<br /> import org.junit.runners.Suite;<br />

    @RunWith(Suite.class)<br /> @Suite.SuiteClasses({Class1Test.class, Class2Test.class})<br /> public class AllTests {<br /> }

    EclEmma tells me that AllTests has 0% coverage because the "code" in the class AllTests is not run at all. Consequently, the overall coverage results become less than the 100% I'm trying to achieve.

    Is it possible to tell EclEmma to ignore the AllTests class?

  2. 2009-10-18 14:36:30 UTC

    Hi,

    EclEmma does not support filtering of single classes. In your example you may exclude the source folders containing tests classes from code coverage at all. To get an idea about your test quality you typically look at the code coverage of the production code, not of the test code.

    See documentation how to select source folders.

    Best regards, -marc

< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.