Exclude methods from code coverage with Cobertura
问题 Is there a way to exclude code from inclusion into Cobertura coverage reports? We have some methods that should not be included in the coverage report and therefore not drive down the coverage numbers. I know that Clover has such a functionality, but I have not found anything similar for Cobertura. 回答1: 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