Re: [qmtest] Context variables for test databases
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [qmtest] Context variables for test databases



nathan@xxxxxxxxx wrote:

I think you've got the basic idea.  With CppUnit you can build shared libraries
that contain your compiled unit tests.  The shared libraries expose functions
that let you query which tests are in each library, run each test, etc.

That sounds like you want to implement a new test database (python class deriving from qm.test.database), which maps the CppUnit library API to the test database API QMTest uses.

In my case, there's usually one unit test library for each normal (non-test)
library.  It would be nice to organize this by making one QMTest test database
for each test library.  The test databases would probably be instances of a
custom test database class that knows how to talk to test libraries and figure
out what tests are in them.

Yes, exactly. Once you figure out how to pass the path variable to QMTest (using the configure trick, for example), you need to query the library for tests so qmtest can run them.

QMTest also has a 'MountDatabase' that allows you to bind multiple databases into one (mapping each 'terminal' library to a suite in the MountDatabase). That may be of interest, if you want to combine multiple test libraries, and access them uniformly, no matter their location.

Regards,
		Stefan

--
Stefan Seefeld
CodeSourcery
stefan@xxxxxxxxxxxxxxxx
(650) 331-3385 x718