[qmtest] PATCH: Create resource classes from test classes

Stefan Seefeld seefeld at sympatico.ca
Fri Sep 2 02:45:19 UTC 2005


Mark Mitchell wrote:
> Several people have suggested that it should be possible to reuse a
> Test class as if it were a Resource.  In particular, the resource
> SetUp method would be the same as the test Run method; the resource
> fails if the test fails.

Mark,

your new ResourceAdapter looks very useful to me.

However, I'm not quite sure how to actually use (i.e. access) it.
A ResourceDescriptor takes a resource id and a Resource class' name
and then instantiates it as any other extension. How would that work with
resource.resource_adapter() ?
If the goal is to allow a Test class name to be passed to a ResourceDescriptor
(i.e. to the 'resources' parameter of a test) and do the wrapping automatically,
wouldn't we need to add some magic to the ResourceDescriptor class ?

In other words, it seems your resource_adapter() function assumes the caller
has already figured out it got a Test class name where a Resource class name
was expected, and now only needs to do the wrapping.

Thanks,
		Stefan



More information about the qmtest mailing list