[qmtest] passing data from one test to another
Mark Mitchell
mark at codesourcery.com
Sat Jul 17 18:14:37 UTC 2004
Scott Lowrey wrote:
> Mark Mitchell wrote:
>
>> J C wrote:
>>
>>> Are there any mechanisms in QMTest to pass data
>>> between 2 different tests during run-time?
>>>
>> We don't make that easy because we don't think it is good test design.
>>
>
> Have to disagree somewhat. After considerable experience with QMTest,
> we've run into some brain twisters that don't seem to lend themselves
> to tidy, compartmentalized design. Although I tell my team that data
> independence is important and that they should look at the problem
> from several angles to find the best way to structure a suite, it
> ain't always easy.
>
> An alternative is to pack several tests into one with multiple
> opportunities to annotate and fail along the way, but that sort of
> defeats the whole purpose of using QMTest, right?
I think the issue here is more conceptual than technical.
For us, a canonical example comes from testing a compiler. Our
canonical test is a single file which must be compiled, linked, and
run. Success means doing all of that and exiting with exit code zero.
We could look at that as three separate tests (a compile test, a link
test, and a run test) with a data dependency -- but we don't because
users of compilers don't think of it that way. Either the compiler
works for that program or it doesn't. So, we have just one test, but
the annotations indicate what kind of failure occurred.
Perhaps you could explain your use case and we could see if there's a
way to do it in QMTest that makes sense? If not, then we can think
about what we could do to QMTest to improve it.
Thanks,
--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark at codesourcery.com
More information about the qmtest
mailing list