context passed among tests?

eichin at metacarta.com eichin at metacarta.com
Tue Dec 31 00:43:22 UTC 2002


Annotations are output-only, right?  Or is it reasonable to have one
test look for annotations provided by another test?

And the context can be input by the user, or set up by resources, but
can't actually be modified by tests, right?

I am, as usual, trying to be too modular :-)  

I've got a chunk of data that I can set up (by pulling it down from a
web site, or checking it out of cvs, whatever.)  That feels like a
"resource" -- perhaps a Wget resource (that takes a source url, and
stuffs a temporary target dir in the context) or a CVS-Checkout
resource (that takes a repository, directory, some auth data, and
likewise puts a target dir in the context.)

Then, I have a few different kinds of (also expensive) processing I
can do on these chunks of data (like "build an inverted index".)  If
resources had dependencies, I could just do it that way; otherwise,
I'm stuck making a wget-indexed and a cvs-indexed class that each have
the wget- and cvs- parameters respectively, plus the index parameters.

Another way to do this in the current framework would be to make them
pseudo-tests -- this gets me dependencies [except that the
prerequisite relationship is a little weak, in that running a single
test doesn't count excluded tests towards prerequisites, but that's
ok] but it *doesn't* get me a way to pass further information on to
other tests, since only Resources can modify the context.  It also
doesn't get cleanups.

Both are sort of close; does it make more sense to
  * stretch resource by adding resource-dependencies
  * stretch test by letting it write to context, and maybe add cleanup
  * add a new thing called an "Operator" (or something), which is a
    Runnable that has all of the above features together?



More information about the qmtest mailing list