Not sure whether this a bug or just a feature that isn't implemented yet, or if I'm just doing something incorrectly, but currently I am not able to generate code coverage reports for test cases that don't make a web call. To reproduce, run unit test cases for a module, click on code coverage report, and view the Invalid coverage set message. I'm not sure how hard a feature this is to implement, but it seems like reporting coverage on unit tests and database tests is an important feature.

Files: 
CommentFileSizeAuthor
#1 updated_code_coverage_patch.patch1.77 KBBerdir

Comments

Berdir’s picture

Status: Active » Needs review
FileSize
1.77 KB

Code that is run within the test is currently not tracked.

The attached patch updates the patch that comes with the module to add code coverage for test methods (and everything that is executed by them), note that you will need to re-apply that patch after applying the attached patch :)

Berdir’s picture

Note that this means that the test execution time will increase quite a bit with this. And it's 30% slower (when limiting to a single module, probably much more when tracking everything) when also tracking the setUp() call, so I left that one out.

Please test.

boombatower’s picture

Assigned: Unassigned » boombatower
Status: Needs review » Fixed

I just pushed a bunch of commits that were developed for ReviewDriven. I believe this is now fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.