Structuring Groovy tests

Markus Strickler <[email protected]>
Newsgroups gmane.comp.web.canoo.webtest
Message-ID <[email protected]>
Hi-

I've just started using Webtest following a pure groovy approach as
described here:
http://mguillem.wordpress.com/2009/04/30/webtest-with-groovy-maven-and-eclipse/

Now I'm wondering what's the best way to structure the tests.
Many tests will make use of common steps, like logging into the website,
putting a product into a shopping cart, etc.)
So what I'm trying to achieve is being able to write tests like this:

        webtest('My Test') {

            addToCart(ean: 12345567)

            login(user: user, password: pasword)

            // some 'regular' webtest calls
        }

Is anyone using webtest with groovy in a similar fashion? Also does anyone
have pointers to non trivial examples of groovy webtests?

Thanks for your help,

-markus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.