[openstack-dev] [nova] fastest way to run individual tests ?

Mike Bayer mbayer at redhat.com
Thu Jul 10 16:23:00 UTC 2014


On 7/10/14, 12:08 PM, Chris Dent wrote:
> On Thu, 10 Jul 2014, Mike Bayer wrote:
>
>> I typically never use tox or testtools at the commandline until I'm
>> ready to commit and want to see what the jenkins builds will see.   I
>> start up the whole thing and then it's time to take a break while it
>> reinvents the whole world.
>
> Me tool I've been squeezing py.test into my testing as well. It
> allows me to do TDD off the test file of the thing that I'm creating
> or changing and focus on just that without the incredibly long round
> trip time for tox and friends.
>
> I do some variation on:
>
>    py.test -svx path/to/test/file.py
>
> with a pre-warmed virtualenv.
>
> My next hope is to get rid of unittest and just do the plain asserts
> that py.test makes so nice and lovely.

i think this is an important issue.  When I first got on the IRC channel
and was asking around about some testing issues, everyone was like,
"just run tox.  why aren't you running tox?   Run tox, it just works!".

well of course it works, but it takes five minutes.   This is a serious
productivity drain and also having to wait five minutes just to test
some small thing means you lose your focus and concentration, leads to
more mistakes and less insight on the best way to do something.

I've been working with openstack for six weeks now and I am extremely
impressed by the infrastructure of stackforge, gerritt, all of that. 
But at the same time there seems to be a bit of "default to heavyweight"
in all cases;  when I ask around about allowing things to work in more
ways than just "how the jenkins builds do it", while it's not always the
case, people have sometimes reacted with puzzlement.   I think when
changes are proposed that allow more flexibility in how tests are run,
databases are built up, and environments are configured, they should be
welcomed.  






More information about the OpenStack-dev mailing list