Hi,

the mailing list is fully correct.

In Grails you can just extract common step sequences in utility methods like

// Utility.groovy
class Utility
{
  doLogin(ant)
  {
    ant.group(description: 'perform login')
    {
      invoke "http://...";
    }
  }
}

// SomeTest.groovy
import static Utility.*
...
webtest('some test')
{
  doLogin(ant)
  ...
}

(my mailer still doesn't compile, syntax error are possible ;-))

When you're utility methods are located directly in your class (or in
some parent class), you don't need to pass ant as parameter.

Cheers,
Marc.
-- 
Blog: http://mguillem.wordpress.com


[EMAIL PROTECTED] wrote:
> 
> I have Grails running with Canoo Webtest plugin installed. Life is great
> except my tests feel very repetitive. When I used Canoo Webtests
> stand-alone, I used a lot of in-line parsing with the entity and put
> common tests in areas available to all. I know a lot of work was going
> on in the background to make those pieces available. Is there a similar
> process for the plugin for Grails? Is there a different way to include
> common tests?
> 
> This may not the best forum to address the question, if it's not please
> let me know. There's not a whole lot of information that discusses this
> that i could find. I would love to be proven wrong - especially if you
> have the documentation available :)

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to