java - Exclude methods from code coverage with Cobertura - Stack Overflow
You can exclude classes from instrumentation. Then they should not appear on reports. See exclude statements below.
You can also ignore calls to some methods. See ignore statement below.
If you are using maven, see maven plugin manual.
<configuration> <instrumentation> <ignores> <ignore>com.example.boringcode.*</ignore> </ignores> <excludes> <exclude>com/example/dullcode/**/*.class</exclude> <exclude>com/example/**/*Test.class</exclude> </excludes> </instrumentation> </configuration>
Read full article from java - Exclude methods from code coverage with Cobertura - Stack Overflow
No comments:
Post a Comment