[ckan-dev] Test coverage

David Read david.read at okfn.org
Mon Jan 10 09:20:16 UTC 2011


Seb,

Super - thanks for this. I raised some tickets on this topic before
Christmas - the more important modules - and assigned them to likely
people, but I guess Rufus and James need to review and schedule some
time for them if tests are desired:
#859: Tests for User model (pudo)
#857: Tests for CLI (??)
#856: Tests for caching (ww)
#855: Authenticator tests (pudo)
#854: Tests for authorization_group (pudo)

ckanclient has its own test suite which I've been working on in #682
and I'll try and get this on buildbot to clear up the remaining
failure.

For ckan.lib.search.sql I think you get only 36% coverage because of
the tests skipped when using sqlite. See the very end of the buildbot
build for the full test coverage:
http://buildbot.okfn.org/builders/builder-ckan/builds/825/steps/shell/logs/stdio

ckan/controllers/form and ckan/controllers/package you get figures
around 70% whereas the buildbot coverage tests (using Ned Batchelor's
coverage tool - part of Nose) gives more like 95%. I'm not sure why
there'd be a difference, as I can't see much room for variance in the
algorithm - a line is either executed or it ain't. Could this be more
skipped tests? These are rather core modules so maybe it would help if
you list the line numbers you're getting untested.

PS Very exciting work on the test speed! I can't wait to give this a
go now I'm back.

David

On 6 January 2011 11:04, Seb Bacon <seb.bacon at gmail.com> wrote:
> I don't know if anyone's done this recently, but in case not, here's
> all the modules that have under 75% test coverage.
>
> We could probably benefit from anyone wanting to cherry-pick some of
> the worst (or most important) offenders...
>
> Seb
>
> ---
>
> 13% ckan/lib/cli
> 21% ckan/controllers/authorization_group
> 29% /home/seb/Code/ckan/src/ckanclient/ckanclient/__init__
> 35% ckan/lib/search/worker
> 36% ckan/lib/search/sql
> 38% ckan/forms/authorization_group
> 38% ckan/lib/authenticator
> 38% ckan/lib/cache
> 56% ckan/model/user
> 63% ckan/lib/dumper
> 67% ckan/controllers/form
> 68% ckan/lib/search/__init__
> 69% ckan/controllers/package
> 71% ckan/controllers/rest
> 72% ckan/controllers/importer
> 72% ckan/lib/search/common
> 72% /home/seb/Code/ckan/src/licenses/licenses/__init__
> 73% ckan/rating
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
>




More information about the ckan-dev mailing list