[qmtest] Context variables for test databases
nathan at auryn.com
nathan at auryn.com
Thu Jun 11 02:37:22 UTC 2009
Hi Stefan,
Thanks for the prompt reply.
> I haven't used CppUnit yet, and so I may misreading what you are saying.
> Specifically, I'm not sure what you mean by "using shared libraries...as
> test databases". Are you saying that the information about what tests
> exist is to be obtained by making calls into a (shared) library ?
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.
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.
If the test libraries were always in the same location after being built, I
would just add the test library location as a parameter in the test database
class. However, since the test libraries could be in a variety of locations, I
need some way to pass the location to use to the test databases. In this case,
each test database would probably just store the name of the test library that
it is associated with. Each test database could then combine its test library
name with the passed in test library directory to figure out the specific
shared library to talk to.
> I have also set up test databases where required variables were provided
> by the QMTest/configuration file. That file was generated via configure
> (i.e., autoconf), and so any required paths could be stored there at
> configure time.
I hadn't considered this option, but it might be workable. I'll look into it
and see if it can do what I want.
Regards,
Nathan.
More information about the qmtest
mailing list