Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to add code coverage support to GAEUnit?

One of the requested features for GAEUnit for over a year has been support for code coverage. Is it technically possible to add coverage support to GAEUnit so that after tests complete, a report could be generated of what modules were tested and what the coverage of each module was?

I can use coverage.py to launch the dev_appserver and produce a coverage report of a GAE python app but this requires local system configuration. One of the nice things about gaeunit is the ability to easily add it as an app to any python gae app so that anyone downloading the app can run the included tests. My ideal scenario would just extend gaeunit and add coverage data to the bottom of the report. So ideally the modification would run inside the dev_appserver as an app just like gaeunit does.

Is this technically possible? What approach would you recommend?

like image 221
Chris Avatar asked Nov 05 '22 22:11

Chris


1 Answers

Coverage.py has a programmatic API that you can use. I don't know anything about GAEUnit, but if you need help with coverage.py, get in touch.

like image 123
Ned Batchelder Avatar answered Nov 12 '22 17:11

Ned Batchelder