[openstack-dev] How to get back the helpful verbose unit test display in Nova

Robert Collins robertc at robertcollins.net
Tue Jan 22 00:08:15 UTC 2013


In addition to Monty's reply...

On 22 January 2013 02:42, Daniel P. Berrange <berrange at redhat.com> wrote:
> In Folsom if you ran Nova's unit tests you'd get an informative display of
> what was being run
>
> $ ./run_tests.sh test_libvirt_vif
>

> Slowest 3 tests took 1.08 secs:
>     0.98    LibvirtVifTestCase.test_bridge_driver
>     0.07    LibvirtVifTestCase.test_ovs_ethernet_driver
>     0.03    LibvirtVifTestCase.test_model_xen
> ----------------------------------------------------------------------
> Ran 9 tests in 1.227s

You can get this (until run_tests is fixed) by running
tools/with_venv.sh testr slowest

and it will print out the slowest tests from the DB. I suspect you
want slowest-from-the-last-run  - please file (or let me know you'd
like me to file one) a bug on testrepository and I can add that, its
an overlooked use case but easily satisfied.

As for verbose output. Fixing
https://bugs.launchpad.net/testtools/+bug/872906 would make it very
easy for testr to change its verbosity, for folk that want chatty
output. (There are other alternatives such as tribunal or running
tests with --subunit | subunit2pyunit, but I'm here to support folk
using my tools, not tell them how to do it ;) [testrepository is a
personal project of mine, built out of frustration with the need to
continually rewrite the same darn code in different test
environments])

In terms of detailed changes, testr already grabs everything needed to
deliver what you want, but its UI is tuned to the workflow established
by devs on big projects - 10's of thousands of test cases, highly
parallel test execution - and some of the opinionated choices need to
become opinionated defaults instead. I totally support that, and would
be delighted to provide advice on where/how to change things to make
different configurations easy to use ['--subunit | subunit2pyunit' is
not 'easy to use'] without compromising the reliability of the CI
environment.

Cheers,
Rob

-- 
Robert Collins <rbtcollins at hp.com>
Distinguished Technologist
HP Cloud Services



More information about the OpenStack-dev mailing list