InterviewSolution
| 1. |
When I Generate Coverage Reports, Why Do They Always Show 100% Coverage Everywhere? |
|
Answer» Cobertura is probably using the wrong .SER file when generating the reports. When you instrument your classes, Cobertura generates a .ser file containing basic information about each class. As your tests run, Cobertura ADDS additional information to this same data file. If the instrumented classes can not find the data file when running then they will create a new one. It is important that you USE the same cobertura.ser file when instrumenting, running, and generating reports. Cobertura is probably using the wrong .ser file when generating the reports. When you instrument your classes, Cobertura generates a .ser file containing basic information about each class. As your tests run, Cobertura adds additional information to this same data file. If the instrumented classes can not find the data file when running then they will create a new one. It is important that you use the same cobertura.ser file when instrumenting, running, and generating reports. |
|