[qmtest] resource extension classes

Stefan Seefeld stefan at codesourcery.com
Tue Jan 18 14:07:01 UTC 2005


J.T. Conklin wrote:
 > I'm writing a unit test suite for our distributed system.  Until now,
 > each component has been tested individually, but now I'll be testing
 > components that interact together.  We're using CORBA as our middle-
 > ware layer, so things like initializing the CORBA Naming Service seem
 > like good fits for QMTest's resource extension class.

Right.

 > I've never used resource classes before, so to get my feet wet I wrote
 > one that inherited from "Resource" with null SetUp() and CleanUp()
 > methods.  I was able to register it without problems, but it doesn't
 > show up in the Resource drop down when I try to add/edit tests.  The

Indeed, I can reproduce that. I'll look into that, but meanwhile you
may just run the test on the command line ('qmtest run your.test').
You should see messages of the form 'Setup <ResourceId>: PASS' to indicate
that the resource has been set up before the actual test is run.

 > temporary.TempDirectoryResource that "qmtest extensions" says is
 > present isn't listed either.
 >
 > Assuming I can get past listing the resource, does anyone have advise
 > they could share on how resources should spawn executables on SetUp()
 > and reap them on CleanUp()?  Is there any QMTest or Python classes to
 > assist?

There are: I usually use classes from the qm.executable
module to do that, e.g. RedirectedExecutable.

Regards,
		Stefan



More information about the qmtest mailing list