Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force Emma code coverage report to ignore some methods?

Some methods, such as auto-generated getters, setters, equals and toString, are trivial for test. However, if they aren't added into the testing classes, the code coverage percentage (calculated using Emma) is reduced and may crash our system build.

How can I force emma to ignore these methods in the code coverage percentage?

Regards,

Felipe

like image 903
Felipe Arenales Avatar asked Dec 02 '10 15:12

Felipe Arenales


1 Answers

From the EMMA FAQ:

A feature to allow EMMA users to mark arbitrary methods as excluded from coverage is being considered for future versions.

So unfortunately this doesn't seem to be possible at the moment. There's an open feature request for this in EMMA's tracker.

like image 91
vehnae Avatar answered Oct 16 '22 01:10

vehnae