[openstack-qa] Refactoring Tempest service clients

Giulio Fidente gfidente at redhat.com
Wed Jul 10 14:59:38 UTC 2013


On 07/10/2013 04:14 PM, Jay Pipes wrote:
> On 07/10/2013 03:38 AM, Giulio Fidente wrote:
>>
>> Going trough the code I think I found a couple of places where we could
>> improve. For instance, what I *think* is problematic are cases like this:

[...]

> Yeah, there are a number of issues with the above test case and base
> classes:

[...]

all of which were good points and confirm the problem isn't in the 
design but rather in how, in a few particular cases, the tests have been 
implemented

>> Also, speaking about actual resources and not credentials, would it be
>> useful to enforce (trough the reviews) the usage of the utility methods
>> provided by the base classes (which also take care of the cleanup)
>> rather than create/delete resources in the test class?
>
> Yes, but the test author must be sure that when they use the base class'
> create_XXX resource methods that:
>
> a) The resource they create using the base class' create_XXX method does
> not affect the results of other test methods -- for instance, if
> test_A() creates a server instance that modifies the assumptions that
> test_B() has, that is a bad thing (a side effect) and should be avoided
>
> b) The resource they create using the base class' create_XXX method does
> not require that the test methods in the test class are run in a
> specific order. If it does, that also is a bad side effect and means the
> test methods in the test case class cannot be run in parallel.

agreed and these two again look to me to be on the head of the good test 
writer / reviewer

thanks for helping with this
-- 
Giulio Fidente
GPG KEY: 08D733BA | IRC: giulivo



More information about the openstack-qa mailing list