java - cobertura - Annotation to ignore files in instrumentation phase -


we use cobertura measure code coverage in unit testing , integrated/system testing.

some classes more note suitable getting coverage in plain unit test. (some require database, gui testing etc). while mock objects, stubs, gui-unit-testing framework here, considering way mark classes not included in instrumentation.

cobertura provides pattern based processing include/exclude classes. there way annotate class , skip instrumenting?

without above, have write custom annotation processor list of classes, , user result skip instrumenting phase.

if using ant run cobertura uses fileset use excludesfile parameter specify file containing list of files ignore.

this list of files produced custom annotation parser or stick unique comment in files , search maybe like

for file in `find ./ -name '*.java'`; if grep --silent "some unique tag" $file ;then echo $file > excludefile.lst; fi ; done 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -