We use Jenkins CI with Sonar for test coverage. We use Atlassian Clover as coverage tool. So the question: how to exclude getter/setter methods from test coverage in order to increase test coverage percent without writing useless test cases? I have tried to make some changes in Settings->General Settings->Clover and Settings->General Settings->Java sections but without any success. As I understand I need to apply something like (.* )?public .(get|set|is)[A-Z0-9]. but I don't know where should I put this expression.
Asked
Active
Viewed 4,350 times
3
-
Not to be contrary, but why wouldn't you test getters and setters? There's a classic location for copy/paste errors. (Unless you're using Groovy or something that's creating those for you). – gaige Aug 23 '13 at 14:55
1 Answers
2
http://jira.codehaus.org/browse/SONAR-766 is currently planned for version 4.1. Feel free to watch it.

David RACODON - QA Consultant
- 4,003
- 1
- 13
- 14