[Webtest] Paramaterized test sequences
Dierk Koenig
webtest@lists.canoo.com
Fri, 18 Jul 2003 10:54:58 +0200
Hi Brandon,
I totally agree to your point, and I haven't found a good solution
either. Although we managed to structure out tests with external
entity and properties this approach is kind of cumbersome.
I thought of doing something like
<steps id="login">
<invoke .../>
<verify... #{username}/>
</steps >
and use it like
<step refid="login">
<param name="username" value="tim" />
<param name="password" value="lutefisk" />
</step >
But I didn't take the time yet to dive deeper into that problem.
cheers
Mittie
> -----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
>