Ignore code coverage for unit tests in EclEmma

David Harkness picture David Harkness · Sep 26, 2012 · Viewed 17.9k times · Source

I have configured EclEmma not to instrument my unit tests which works fine. However, the editor still highlights the test code as not covered. I want no highlighting in unit tests because they are not instrumented to detect coverage. How can I do this?

Answer

Martin Matthews picture Martin Matthews · Mar 20, 2014

I did the following steps:

  1. Go to Preferences->Java->Code Coverage and
  2. set the "Only path entries matching" option to src/main/java

It seems to work nicely.