Ignore code coverage for unit tests in EclEmma

家住魔仙堡 提交于 2019-11-28 22:30:25
Martin Matthews

I did this in Preferences->Java->Code Coverage and set the "Only path entries matching" option to src/main/java - seems to work nicely.

The include/exclude filter settings in the Preferences window apply to class name/package patterns for all projects. To control the files at the folder/path level you must set it per-project.

  1. Right-click the project
  2. Select Coverage As | Coverage Configurations...
  3. Select the project under the Junit subtree
  4. Select the Coverage tab on the right
  5. Uncheck the folder containing your tests, e.g., src/test/java
  6. Click Apply
  7. Click Close (or Coverage to run immediately)

These settings will apply every time you run the coverage in the future without having to open the configuration window.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!