← Back to team overview

testrepository-dev team mailing list archive

Re: ask for help about how to run testr

 

On Mon, Dec 10, 2012 at 2:18 AM, Zhu Bo <bozhu@xxxxxxxxxxxxxxxxxx> wrote:
> hi, folks:
>      I am woking on the blue-print: remove nose from tempest and use
> testtools/testr instead. After I read the
>  manual.txt , I already don't know how to use testr. I think testr is not a
> test runner like nose. Becasue in the help
>  information, we need run 'foo' to execute tests.
>
> """
> [DEFAULT]
> test_command=foo $IDOPTION
> test_id_option=--bar $IDFILE
> ---
> will cause 'testr run' to run 'foo' to execute tests, and
> 'testr run --failing' will cause 'foo --bar failing.list ' to be run to
> execute tests. Shell variables are expanded in these commands on platforms
> that have a shell.
> """
>
> I think the 'foo' maybe like this "nosetests test_xxxxx" or
> "./run_tests.sh".  If testr is not a test runner, why
> can we use testr instead of nose. And I think testr just record the result
> of the test in order
>  to next time we can only run the tests we need. Am I right?
> And I also don't konw how to repeat a failure that occured on a remote
> machine (e.g. during a jenkins test run).
>      If anyone can give me some help on these questions and give me an
> example of '.testr.conf', I would appreciate it
>  very much.
>
>
> Thanks && Best regards
> Ivan

Hi there. Clark (Cc'd) has a branch for nova which has a .testr.conf.
Its in gerrit at the moment on review.openstack.org. You can take the
subunit stream from testr and use 'testr load' to load that stream
into a repository. You can use nosetests with the subunit plugin, but
nothing in openstack needs nose features, so its simpler to use
subunit directly.

-Rob

-- 
Robert Collins <rbtcollins@xxxxxx>
Distinguished Technologist
HP Cloud Services


References