[Webtest] Paramaterized test sequences

Brandon Moore webtest@lists.canoo.com
Fri, 18 Jul 2003 14:18:17 -0500

Hi Mittie

I think naming a set of steps should work. Ant handles the id attribute,
but steps might need to inherit from DataType, or at least ProjectComponent
if we want to be able to define procedures outside of tasks. I don't know
if there is any way to refer to named items in another buildfile, which we
should be able to do if we are trying to modularize our tests.

I'm also worried about parameter passing. It seems that dynamic parameters
stored in a global dictionary. I think the parameter values would still be
set after the call finished. I don't think a procedure could use its
after making a call to another procedure that used the same parameter names.

If steps could be written so tests could make an antcall to them, we could
reuse a bunch of work ant already does. Unfortunately, I can't find any
way for an ant task to learn if it is running because of an antcall, so
I don't know how the steps could find the webtest context from the parent


> -----Original Message-----
> From: webtest-admin@lists.canoo.com
> [mailto:webtest-admin@lists.canoo.com]On Behalf Of Brandon Moore
> Sent: Donnerstag, 17. Juli 2003 21:23
> To: Canoo Mailing List (E-mail)
> Subject: [Webtest] Paramaterized test sequences
> 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" />
> </procedure>
> 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
> parameters.
> 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.
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
WebTest mailing list