[openstack-dev] [tempest] API testing coverage in tempest

Jordan Pittier jordan.pittier at scality.com
Tue Mar 3 09:19:06 UTC 2015


Hi

A long time ago, I was asked to do the same job. I tried to come up with a
"programmed" way of doing this.

For some openstack component, there's a python object called "router" which
holds the routes (the URLs that form the API).
For nova :
https://github.com/openstack/nova/blob/master/nova/api/openstack/__init__.py#L197
For glance :
https://github.com/openstack/glance/blob/master/glance/api/v1/router.py#L117
For cinder :
https://github.com/openstack/cinder/blob/master/cinder/api/openstack/__init__.py#L86
For neutron
https://github.com/openstack/neutron/blob/master/neutron/api/v2/router.py#L122
and
https://github.com/openstack/neutron/blob/master/neutron/api/extensions.py#L320

If you inspect this object (and more precisely what is called 'the mapper')
you can get all the URLs that form the API. Then you could "sanitize" the
URLs.

Then, you run Tempest with debug=True, parse all the URLs in tempest.log.

Finally you make a match (comparison) between the URLs in tempest.log and
the URLs defined in the 'mapper' of each project.

Does it make sense ?

Hope it helps,
Jordan


On Tue, Mar 3, 2015 at 8:28 AM, Rohan Kanade <openstack at rohankanade.com>
wrote:

> Hi,
>
> So i have been tracking API test coverage in tempest in a ad-hoc way where
> i check the actual tempest tests and the API documentation for that
> specific component eg. Neutron
>
> Is there a better way or documentation maintained by Tempest team for data
> about API test coverage per OpenStack project?
>
> Regards,
> Rohan Kanade
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> 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/20150303/49e1f603/attachment.html>


More information about the OpenStack-dev mailing list