Grouping of webtests in grails (was: Re: Antwort: RE: [Webtest] Canoo + Grails)
Niko Schmuck
Niko Schmuck <niko.schmuck@nava.de>
Thu, 3 Apr 2008 20:31:37 +0200
--Apple-Mail-1--840452492
Content-Type: text/plain;
charset=ISO-8859-1;
format=flowed;
delsp=yes
Content-Transfer-Encoding: quoted-printable
Hi Marc,
Many thanks for hinting me on your contributions, this sounds very =20
much what I was looking for. Hopefully your patch (or at least the =20
concept of grouping tests) gets accepted and into the webtest plug-in, =20=
its very elegant then to support testing the different environment =20
scenarios.
Thanks for your help,
Niko
Am 03.04.2008 um 13:40 schrieb pompl@comnetmedia.de:
> Hi Niko,
>
> > Another question is (for may be including in the documentation), =20
> how to
> > define more than one test suites (beside the standard
> > webtest/tests/TestSuite.groovy) and how to invoke them.
>
> just search for "Any public interest in separating tests by =20
> groups?" in the "grails user" mailing list.
>
> There is a patch which may solve your problem.
>
> I hope, it will be applied to a coming grails version.
>
>
> Best regards
> Marc Pompl
>
>
>
> "Niko Schmuck" <niko.schmuck@nava.de>
> Gesendet von: webtest-admin@lists.canoo.com
> 03.04.2008 12:20
> Bitte antworten an
> webtest@lists.canoo.com
>
> An
> Dierk K=F6nig <dierk.koenig@canoo.com>
> Kopie
> webtest@lists.canoo.com
> Thema
> RE: [Webtest] Canoo + Grails
>
>
>
>
>
> Hi Dierk, and all,
>
> webtest embedded into the grails development process is absolutely =20
> great
> to use. Thanks very much for your groovy-fication!
>
> The only thing I wonder is, how one would get out the webtest step
> properties into the groovy script for further processing. I am sure =20=
> there
> is a groovy way to interact between webtest properties and groovy
> variables, but cannot find it.
>
> Another question is (for may be including in the documentation), how =20=
> to
> define more than one test suites (beside the standard
> webtest/tests/TestSuite.groovy) and how to invoke them.
>
> Cheers,
> Niko
>
>
> On Wed, April 2, 2008 4:05 pm, Dierk K=F6nig wrote:
> > Hi David,
> >
> > The documentation of general Groovy usage with WebTest is
> > under http://webtest.canoo.com/webtest/manual/groovyTesting.html
> > which in turns points to
> > http://grails.codehaus.org/Functional+Testing
> > for the Grais specifics.
> >
> > Could you give a list of topics that are not covered by these
> > pages?
> >
> > much appreciated
> > Dierk
> >
> > | -----Original Message-----
> > | From: webtest-admin@lists.canoo.com
> > | [mailto:webtest-admin@lists.canoo.com] On Behalf Of
> > | david.cate@wachovia.com
> > | Sent: Mittwoch, 2. April 2008 14:39
> > | To: webtest@gate4.canoo.com
> > | Subject: Re: [Webtest] Canoo + Grails
> > |
> > |
> > | Marc, thank you for the response - got it working
> > | beautifully. I've noticed that while the Canoo documentation
> > | is fairly thorough with the exception of the Grails portion
> > | and even Grails skips around the functional testing portion as =20
> well.
> > |
> > | 1. Are there any sites or guides that give a good overview of
> > | custom functional testing for Webtests in Grails?
> > | 2. This is just to confirm something: the XML patterns for
> > | specifying the tests are not available with the Grails plugin
> > | - correct? If I create my tests within the XML using
> > | definitions and entity replacements - I would then need to
> > | change those tests to use the method described below?
> > |
> > |
> > |
> > |
> > | Marc Guillemot <mguillemot@yahoo.fr>
> > | Sent by: webtest-admin@gate4.canoo.com
> > |
> > | 04/02/2008 05:34 AM
> > | Please respond to
> > | webtest@gate4.canoo.com
> > |
> > | To
> > | webtest@gate4.canoo.com
> > | cc
> > | Subject
> > | Re: [Webtest] Canoo + Grails
> > |
> > |
> > |
> > |
> > |
> > |
> > | 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
> > |
> > |
> > | david.cate@wachovia.com 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 =20
> 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 :)
--Apple-Mail-1--840452492
Content-Type: text/html;
charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<html><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
-webkit-line-break: after-white-space; "><div>Hi =
Marc,</div><div><br></div><div>Many thanks for hinting me on your =
contributions, this sounds very much what I was looking for. Hopefully =
your patch (or at least the concept of grouping tests) gets accepted and =
into the webtest plug-in, its very elegant then to support testing the =
different environment scenarios.</div><div><br></div><div>Thanks for =
your help,</div><div>Niko </div><div><br></div><br><div><html>Am =
03.04.2008 um 13:40 schrieb <a =
href=3D"mailto:pompl@comnetmedia.de">pompl@comnetmedia.de</a>:</html><bloc=
kquote type=3D"cite"><font size=3D"2" face=3D"sans-serif">Hi =
Niko,</font> <br> <br><tt><font size=3D"2">> Another question is (for =
may be including in the documentation), how to<br> > define more than =
one test suites (beside the standard<br> > =
webtest/tests/TestSuite.groovy) and how to invoke them.</font></tt> <br> =
<br><font size=3D"2" face=3D"sans-serif">just search for "Any public =
interest in separating tests by groups?" in the "grails user" =
mailing list.</font> <br> <br><font size=3D"2" face=3D"sans-serif">There =
is a patch which may solve your problem.</font> <br> <br><font size=3D"2" =
face=3D"sans-serif">I hope, it will be applied to a coming grails =
version.</font> <br> <br> <br><font size=3D"2" face=3D"sans-serif">Best =
regards</font> <br><font size=3D"2" face=3D"sans-serif">Marc =
Pompl</font> <br> <br> <br> <br> <table width=3D"100%"> <tbody><tr =
valign=3D"top"> <td width=3D"40%"><font size=3D"1" =
face=3D"sans-serif"><b>"Niko Schmuck" <<a =
href=3D"mailto:niko.schmuck@nava.de">niko.schmuck@nava.de</a>></b> =
</font> <br><font size=3D"1" face=3D"sans-serif">Gesendet von: <a =
href=3D"mailto:webtest-admin@lists.canoo.com">webtest-admin@lists.canoo.co=
m</a></font><p><font size=3D"1" face=3D"sans-serif">03.04.2008 =
12:20</font> <table border=3D""> <tbody><tr valign=3D"top"> <td =
bgcolor=3D"white"> <div align=3D"center"><font size=3D"1" =
face=3D"sans-serif">Bitte antworten an<br> <a =
href=3D"mailto:webtest@lists.canoo.com">webtest@lists.canoo.com</a></font>=
</div></td></tr></tbody></table> <br> </p></td><td width=3D"59%"> <table =
width=3D"100%"> <tbody><tr> <td> <div align=3D"right"><font size=3D"1" =
face=3D"sans-serif">An</font></div> </td><td valign=3D"top"><font =
size=3D"1" face=3D"sans-serif">Dierk K=F6nig <<a =
href=3D"mailto:dierk.koenig@canoo.com">dierk.koenig@canoo.com</a>></font> =
</td></tr><tr> <td> <div align=3D"right"><font size=3D"1" =
face=3D"sans-serif">Kopie</font></div> </td><td valign=3D"top"><font =
size=3D"1" face=3D"sans-serif"><a =
href=3D"mailto:webtest@lists.canoo.com">webtest@lists.canoo.com</a></font>=
</td></tr><tr> <td> <div align=3D"right"><font size=3D"1" =
face=3D"sans-serif">Thema</font></div> </td><td valign=3D"top"><font =
size=3D"1" face=3D"sans-serif">RE: [Webtest] Canoo + =
Grails</font></td></tr></tbody></table> <br> <table> <tbody><tr =
valign=3D"top"> <td> </td><td></td></tr></tbody></table> =
<br></td></tr></tbody></table> <br> <br> <br><tt><font size=3D"2">Hi =
Dierk, and all,<br> <br> webtest embedded into the grails development =
process is absolutely great<br> to use. Thanks very much for your =
groovy-fication!<br> <br> The only thing I wonder is, how one would get =
out the webtest step<br> properties into the groovy script for further =
processing. I am sure there<br> is a groovy way to interact between =
webtest properties and groovy<br> variables, but cannot find it.<br> =
<br> Another question is (for may be including in the documentation), =
how to<br> define more than one test suites (beside the standard<br> =
webtest/tests/TestSuite.groovy) and how to invoke them.<br> <br> =
Cheers,<br> Niko<br> <br> <br> On Wed, April 2, 2008 4:05 pm, Dierk =
K=F6nig wrote:<br> > Hi David,<br> ><br> > The documentation of general =
Groovy usage with WebTest is<br> > under <a =
href=3D"http://webtest.canoo.com/webtest/manual/groovyTesting.html">http:/=
/webtest.canoo.com/webtest/manual/groovyTesting.html</a><br> > which in =
turns points to<br> > <a =
href=3D"http://grails.codehaus.org/Functional+Testing">http://grails.codeh=
aus.org/Functional+Testing</a><br> > for the Grais specifics.<br> ><br> =
> Could you give a list of topics that are not covered by these<br> > =
pages?<br> ><br> > much appreciated<br> > Dierk<br> ><br> > | =
-----Original Message-----<br> > | From: <a =
href=3D"mailto:webtest-admin@lists.canoo.com">webtest-admin@lists.canoo.co=
m</a><br> > | [<a =
href=3D"mailto:webtest-admin@lists.canoo.com">mailto:webtest-admin@lists.c=
anoo.com</a>] On Behalf Of<br> > | <a =
href=3D"mailto:david.cate@wachovia.com">david.cate@wachovia.com</a><br> =
> | Sent: Mittwoch, 2. April 2008 14:39<br> > | To: <a =
href=3D"mailto:webtest@gate4.canoo.com">webtest@gate4.canoo.com</a><br> =
> | Subject: Re: [Webtest] Canoo + Grails<br> > |<br> > |<br> > | Marc, =
thank you for the response - got it working<br> > | beautifully. I've =
noticed that while the Canoo documentation<br> > | is fairly thorough =
with the exception of the Grails portion<br> > | and even Grails skips =
around the functional testing portion as well.<br> > |<br> > | 1. Are =
there any sites or guides that give a good overview of<br> > | custom =
functional testing for Webtests in Grails?<br> > | 2. This is just to =
confirm something: the XML patterns for<br> > | specifying the tests are =
not available with the Grails plugin<br> > | - correct? If I create my =
tests within the XML using<br> > | definitions and entity replacements - =
I would then need to<br> > | change those tests to use the method =
described below?<br> > |<br> > |<br> > |<br> > |<br> > | Marc Guillemot =
<<a href=3D"mailto:mguillemot@yahoo.fr">mguillemot@yahoo.fr</a>><br> =
> | Sent by: <a =
href=3D"mailto:webtest-admin@gate4.canoo.com">webtest-admin@gate4.canoo.co=
m</a><br> > |<br> > | 04/02/2008 05:34 AM<br> > | Please respond to<br> =
> | <a =
href=3D"mailto:webtest@gate4.canoo.com">webtest@gate4.canoo.com</a><br> =
> |<br> > | To<br> > | <a =
href=3D"mailto:webtest@gate4.canoo.com">webtest@gate4.canoo.com</a><br> =
> | cc<br> > | Subject<br> > | Re: [Webtest] Canoo + Grails<br> > |<br> =
> |<br> > |<br> > |<br> > |<br> > |<br> > | Hi,<br> > |<br> > | the =
mailing list is fully correct.<br> > |<br> > | In Grails you can just =
extract common step sequences in<br> > | utility methods like<br> > =
|<br> > | // Utility.groovy<br> > | class Utility<br> > | {<br> > | =
doLogin(ant)<br> > | {<br> > | =
ant.group(description: 'perform login')<br> > | {<br> =
> | invoke "http://..."<br> > | }<br> > =
| }<br> > | }<br> > |<br> > | // SomeTest.groovy<br> > | import =
static Utility.*<br> > | ...<br> > | webtest('some test')<br> > | {<br> =
> | doLogin(ant)<br> > | ...<br> > | }<br> > |<br> > | (my =
mailer still doesn't compile, syntax error are possible ;-))<br> > |<br> =
> | When you're utility methods are located directly in your<br> > | =
class (or in some parent class), you don't need to pass ant<br> > | as =
parameter.<br> > |<br> > | Cheers,<br> > | Marc.<br> > | --<br> > | =
Blog: <a =
href=3D"http://mguillem.wordpress.com">http://mguillem.wordpress.com</a><b=
r> > |<br> > |<br> > | <a =
href=3D"mailto:david.cate@wachovia.com">david.cate@wachovia.com</a> =
wrote:<br> > | ><br> > | > I have Grails running with Canoo Webtest =
plugin installed.<br> > | Life is great<br> > | > except my tests feel =
very repetitive. When I used Canoo Webtests<br> > | > stand-alone, I =
used a lot of in-line parsing with the entity and put<br> > | > common =
tests in areas available to all. I know a lot of<br> > | work was =
going<br> > | > on in the background to make those pieces available. =
Is<br> > | there a similar<br> > | > process for the plugin for Grails? =
Is there a different way<br> > | to include<br> > | > common tests?<br> =
> | ><br> > | > This may not the best forum to address the question, =
if<br> > | it's not please<br> > | > let me know. There's not a whole =
lot of information that<br> > | discusses this<br> > | > that i could =
find. I would love to be proven wrong -<br> > | especially if you<br> > =
| > have the documentation available =
:)<br></font></tt></blockquote></div></body></html>=
--Apple-Mail-1--840452492--