[openstack-dev] [Keystone] unit test coverage
Dolph Mathews
dolph.mathews at gmail.com
Wed Dec 5 14:59:58 UTC 2012
Awesome. Skimming through some of the reports, there are certainly areas of
zero coverage worthy of bug reports.
There's also a job on jenkins to run coverage, but it appears to be broken:
https://jenkins.openstack.org/view/Keystone/job/keystone-coverage/783/console
... empty files have 100% coverage and everything else is reporting 0%.
-Dolph
On Tue, Dec 4, 2012 at 9:10 PM, Adam Young <ayoung at redhat.com> wrote:
> I just realized that run_test.sh has an option to generate test coverage.
> As I go through and do a bit of refactoring, I am painfully aware at how
> dependent we are on unit tests to make sure we don't break anything.
>
> Results:
>
> http://admiyo.fedorapeople.**org/openstack/covhtml/<http://admiyo.fedorapeople.org/openstack/covhtml/>
>
> I would say that we are not doing too bad. Our total is 81% right now. A
> good chunk of that comes from Open stack common, where we don't run or test
> all the code we pull in.
>
> The worst offenders right now:
>
> keystone.identity.backends.pam 51%
>
> This seems odd. I wonder if we are disabling more tests than we should.
> This backend should be easy to keep up with SQL.
>
> Some other notables.
>
> keystone.common.controller 57% Short file, but critical to most other
> things.
> http://admiyo.fedorapeople.**org/openstack/covhtml/**
> keystone_common_controller.**html<http://admiyo.fedorapeople.org/openstack/covhtml/keystone_common_controller.html>
> Looks like that should be testing RBAC.
>
>
> SQL tests across the board we need more testing of downgrade.
> Example:
> http://admiyo.fedorapeople.**org/openstack/covhtml/**
> keystone_common_sql_migrate_**repo_versions_004_undo_token_**id_hash.html<http://admiyo.fedorapeople.org/openstack/covhtml/keystone_common_sql_migrate_repo_versions_004_undo_token_id_hash.html>
>
>
> keystone.common.ldap.core 73% Paging code is untested. Also, a few
> of the helper functions at the top look like they are unused and can be
> removed. I like removing code.
>
> keystone.common.utils 64% If the utilities are not being used,
> we should probably remove them.
> keystone.identity.core 62% No Big deal: all the un
> implemented functions.
>
> So, if you are touching any of these files, try and up the percentage.
>
> We should review the test coverage in the weekly meeting.
>
>
> ______________________________**_________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.**org <OpenStack-dev at lists.openstack.org>
> http://lists.openstack.org/**cgi-bin/mailman/listinfo/**openstack-dev<http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20121205/311abb81/attachment.html>
More information about the OpenStack-dev
mailing list