Hi,
a custom step would be probably perfect for that. Within your custom
step you can use an AntBuilder to call other WebTest steps and have them
visible in reports.
This could look like following:
<groovyScript>
<![CDATA[
class MyStep extends com.canoo.webtest.steps.Step
{
void doExecute()
{
def fields = ... // retrieve fields
def ant = new AntBuilder(project)
fields.each { key, value ->
if (...test if field available...)
ant.setInputField(name: key, value: value)
}
}
}
project.addTaskDefinition('myStep', MyStep)
]]>
</groovyScript>
Cheers,
Marc.
--
Blog: http://mguillem.wordpress.com
[EMAIL PROTECTED] wrote:
> Hi,
>
>
>
> I’d like to fill forms on several html with groovy and webtest.
>
>
>
> -A file, which contains a mapping of “fieldname – value“, shall be the
> database.
>
> -Each form containing a subset of fields from the database.
>
>
>
>
>
> I need a hint on the design. I could imagine a way of using webtest by
> getting each site and then execute a groovyscript checking the database
> on the needed fields.
>
>
>
> I wonder if that’s the “best” way of combining webtest with groovy, or
> should it be used in another way.
>
>
>
> Cheers Dennis
>
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest