[qmtest] extending FileDatabase
Stefan Seefeld
seefeld at sympatico.ca
Fri Nov 28 15:07:06 UTC 2003
Stefan Seefeld wrote:
> hi there,
>
> I'm trying to define my own test database that is basically
> a file database, i.e. which defines an association between tests
> and files...with some exceptions.
>
> My first guess was to derive from FileDatabase, but that
> doesn't seem to be as straight forward as it sounds:
>
> The method 'GetTest' (which, as it is documented, must not be
> overridden), calls 'GetTestPath'. The latter returns a path,
> which has to fulfill '_IsTestFile' or 'NoSuchTestError' will
> be raised.
I'v had a look into the GCCDatabase code for inspiration.
It does what looks very reasonable, albeit not conforming to
the FileDatabase docs: it overrides the GetSuite() method such
that it can determine whether the suite is implicit (i.e. has
no corresponding directory). Only when it does the parent
class (FileDatabase) GetSuite() is called.
The FileDadabase insists that GetSuite() and GetTest() must
not be overridden. It would be helpful if the documentation
was a bit more correct, or, even better, if the tutorial
outlines the design of the Database and Test classes, so
it is easier for developers to develop their own extensions.
Unfortunately my understanding of the design is still a bit
limitted, so all I can suggest at this point is to remove
these 'must not override this method' comments :-)
Is anybody else interested in this kind of documentation ?
I do believe it would be a great help for the acceptance of
qmtest into domains where other testing tools had been used
before, if some guidance would be provided as to how to
integrate qmtest into such environments (for example make it
collaborate with 'make', etc., etc.)
Thanks,
Stefan
More information about the qmtest
mailing list