[Webtest] Paramaterized test sequences

Brandon Moore webtest@lists.canoo.com
Thu, 17 Jul 2003 14:23:21 -0500

Is there any reasonable way to pull out a sequence
of test steps that should depend on some parameters?
For example, you might want to be able to say
<procedure name="login">
	<param name="username" value="tim" />
	<param name="password" value="lutefisk" />
The only way I know of to name a sequence of test steps
is with XML entities, but they don't take parameters.

If you use ant properties you have to avoid name conflicts,
because you can only set them once, and even then you need
to wrap your targets with an antcall if you want to use the
same sequence in two different tests with different

I suppose the easiest thing to do is use dynamic parameters
but I would like to avoid writing a custom step (to set the
parameters), and I don't really like the idea of controlling
behavior with what amount to global variables.

If test steps could find their context across an antcall
I would modularize my tests by pulling procedures out into
targets that took arguments in ant properties. This would
end the need to write a DTD, but it would require reworking
the engine.