Antwort: Grouping of webtests in grails (was: Re: Antwort: RE: [Webtest] Canoo
+ Grails)
pompl@comnetmedia.de
pompl@comnetmedia.de
Fri, 4 Apr 2008 16:50:00 +0200
Dies ist eine mehrteilige Nachricht im MIME-Format.
--=_alternative 00517CFAC1257421_=
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi Niko,
combining this patch with upcoming GRAILS-737 (Add support for multiple=20
webtest environments) will be really helpful for me. :)
Best regards,
Marc Pompl
Niko Schmuck <niko.schmuck@nava.de>=20
Gesendet von: webtest-admin@lists.canoo.com
03.04.2008 20:31
Bitte antworten an
webtest@lists.canoo.com
An
webtest@lists.canoo.com
Kopie
Thema
Grouping of webtests in grails (was: Re: Antwort: RE: [Webtest] Canoo +=20
Grails)
Hi Marc,
Many thanks for hinting me on your contributions, this sounds very much=20
what I was looking for. Hopefully your patch (or at least the concept of=20
grouping tests) gets accepted and into the webtest plug-in, its very=20
elegant then to support testing the different environment scenarios.
Thanks for your help,
Niko=20
Am 03.04.2008 um 13:40 schrieb pompl@comnetmedia.de:
Hi Niko,=20
> Another question is (for may be including in the documentation), how to
> define more than one test suites (beside the standard
> webtest/tests/TestSuite.groovy) and how to invoke them.=20
just search for "Any public interest in separating tests by groups?" in=20
the "grails user" mailing list.=20
There is a patch which may solve your problem.=20
I hope, it will be applied to a coming grails version.=20
Best regards=20
Marc Pompl=20
"Niko Schmuck" <niko.schmuck@nava.de>=20
Gesendet von: webtest-admin@lists.canoo.com
03.04.2008 12:20=20
Bitte antworten an
webtest@lists.canoo.com
An
Dierk K=F6nig <dierk.koenig@canoo.com>=20
Kopie
webtest@lists.canoo.com=20
Thema
RE: [Webtest] Canoo + Grails
Hi Dierk, and all,
webtest embedded into the grails development process is absolutely 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 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 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 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 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 :)
--=_alternative 00517CFAC1257421_=
Content-Type: text/html; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
<br><font size=3D2 face=3D"sans-serif">Hi Niko,</font>
<br>
<br><font size=3D2 face=3D"sans-serif">combining this patch with upcoming G=
RAILS-737
(<b>Add support for multiple webtest environments</b>) will be really helpf=
ul
for me. :)</font>
<br>
<div>
<br>
<br><font size=3D2 face=3D"sans-serif">Best regards,</font>
<br><font size=3D2 face=3D"sans-serif">Marc Pompl</font>
<br>
<br>
<br>
<br>
<table width=3D100%>
<tr valign=3Dtop>
<td width=3D40%><font size=3D1 face=3D"sans-serif"><b>Niko Schmuck <niko=
.schmuck@nava.de></b>
</font>
<br><font size=3D1 face=3D"sans-serif">Gesendet von: webtest-admin@lists.ca=
noo.com</font>
<p><font size=3D1 face=3D"sans-serif">03.04.2008 20:31</font>
<table border>
<tr valign=3Dtop>
<td bgcolor=3Dwhite>
<div align=3Dcenter><font size=3D1 face=3D"sans-serif">Bitte antworten an<b=
r>
webtest@lists.canoo.com</font></div></table>
<br>
<td width=3D59%>
<table width=3D100%>
<tr>
<td>
<div align=3Dright><font size=3D1 face=3D"sans-serif">An</font></div>
<td valign=3Dtop><font size=3D1 face=3D"sans-serif">webtest@lists.canoo.com=
</font>
<tr>
<td>
<div align=3Dright><font size=3D1 face=3D"sans-serif">Kopie</font></div>
<td valign=3Dtop>
<tr>
<td>
<div align=3Dright><font size=3D1 face=3D"sans-serif">Thema</font></div>
<td valign=3Dtop><font size=3D1 face=3D"sans-serif">Grouping of webtests in=
grails
(was: Re: Antwort: RE: [Webtest] Canoo + Grails)</font></table>
<br>
<table>
<tr valign=3Dtop>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=3D3>Hi Marc,</font>
<br>
<br><font size=3D3>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 scenario=
s.</font>
<br>
<br><font size=3D3>Thanks for your help,</font>
<br><font size=3D3>Niko </font>
<br>
<br>
<br><font size=3D3>Am 03.04.2008 um 13:40 schrieb </font><a href=3Dmailto:p=
ompl@comnetmedia.de><font size=3D3 color=3Dblue><u>pompl@comnetmedia.de</u>=
</font></a><font size=3D3>:</font>
<br><font size=3D2 face=3D"sans-serif">Hi Niko,</font><font size=3D3> <br>
</font><tt><font size=3D2><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.</font></tt><fo=
nt size=3D3>
<br>
</font><font size=3D2 face=3D"sans-serif"><br>
just search for "Any public interest in separating tests by grou=
ps?"
in the "grails user" mailing list.</font><font size=3D3> <br>
</font><font size=3D2 face=3D"sans-serif"><br>
There is a patch which may solve your problem.</font><font size=3D3> <br>
</font><font size=3D2 face=3D"sans-serif"><br>
I hope, it will be applied to a coming grails version.</font><font size=3D3>
<br>
<br>
</font><font size=3D2 face=3D"sans-serif"><br>
Best regards</font><font size=3D3> </font><font size=3D2 face=3D"sans-serif=
"><br>
Marc Pompl</font><font size=3D3> <br>
<br>
<br>
</font>
<table width=3D100%>
<tr valign=3Dtop>
<td width=3D51%><font size=3D1 face=3D"sans-serif"><b>"Niko Schmuck&qu=
ot;
<</b></font><a href=3Dmailto:niko.schmuck@nava.de><font size=3D1 color=
=3Dblue face=3D"sans-serif"><b><u>niko.schmuck@nava.de</u></b></font></a><f=
ont size=3D1 face=3D"sans-serif"><b>></b>
<br>
Gesendet von: </font><a href=3D"mailto:webtest-admin@lists.canoo.com"><font=
size=3D1 color=3Dblue face=3D"sans-serif"><u>webtest-admin@lists.canoo.com=
</u></font></a>
<p><font size=3D1 face=3D"sans-serif">03.04.2008 12:20</font><font size=3D3>
</font>
<br>
<table border=3D4>
<tr valign=3Dtop>
<td bgcolor=3Dwhite>
<div align=3Dcenter><font size=3D1 face=3D"sans-serif">Bitte antworten an</=
font><font size=3D1 color=3Dblue face=3D"sans-serif"><u><br>
</u></font><a href=3Dmailto:webtest@lists.canoo.com><font size=3D1 color=3D=
blue face=3D"sans-serif"><u>webtest@lists.canoo.com</u></font></a></div></t=
able>
<p>
<td width=3D48%>
<br>
<table width=3D100%>
<tr>
<td width=3D15%>
<div align=3Dright><font size=3D1 face=3D"sans-serif">An</font></div>
<td width=3D84% valign=3Dtop><font size=3D1 face=3D"sans-serif">Dierk K=F6n=
ig <</font><a href=3Dmailto:dierk.koenig@canoo.com><font size=3D1 color=
=3Dblue face=3D"sans-serif"><u>dierk.koenig@canoo.com</u></font></a><font s=
ize=3D1 face=3D"sans-serif">></font><font size=3D3>
</font>
<tr>
<td>
<div align=3Dright><font size=3D1 face=3D"sans-serif">Kopie</font></div>
<td valign=3Dtop><a href=3Dmailto:webtest@lists.canoo.com><font size=3D1 co=
lor=3Dblue face=3D"sans-serif"><u>webtest@lists.canoo.com</u></font></a><fo=
nt size=3D3>
</font>
<tr>
<td>
<div align=3Dright><font size=3D1 face=3D"sans-serif">Thema</font></div>
<td valign=3Dtop><font size=3D1 face=3D"sans-serif">RE: [Webtest] Canoo + G=
rails</font></table>
<br>
<br>
<table>
<tr valign=3Dtop>
<td>
<td></table>
<br></table>
<br><font size=3D3><br>
<br>
</font><tt><font size=3D2><br>
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<b=
r>
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 </font></tt><a href=3Dhttp://webtest.canoo.com/webtest/manual/gr=
oovyTesting.html><tt><font size=3D2 color=3Dblue><u>http://webtest.canoo.co=
m/webtest/manual/groovyTesting.html</u></font></tt></a><tt><font size=3D2><=
br>
> which in turns points to<br>
> </font></tt><a href=3D"http://grails.codehaus.org/Functional+Testing">=
<tt><font size=3D2 color=3Dblue><u>http://grails.codehaus.org/Functional+Te=
sting</u></font></tt></a><tt><font size=3D2><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: </font></tt><a href=3D"mailto:webtest-admin@lists.canoo.com"><=
tt><font size=3D2 color=3Dblue><u>webtest-admin@lists.canoo.com</u></font><=
/tt></a><tt><font size=3D2><br>
> | [</font></tt><a href=3D"mailto:webtest-admin@lists.canoo.com"><tt><f=
ont size=3D2 color=3Dblue><u>mailto:webtest-admin@lists.canoo.com</u></font=
></tt></a><tt><font size=3D2>]
On Behalf Of<br>
> | </font></tt><a href=3Dmailto:david.cate@wachovia.com><tt><font size=
=3D2 color=3Dblue><u>david.cate@wachovia.com</u></font></tt></a><tt><font s=
ize=3D2><br>
> | Sent: Mittwoch, 2. April 2008 14:39<br>
> | To: </font></tt><a href=3Dmailto:webtest@gate4.canoo.com><tt><font s=
ize=3D2 color=3Dblue><u>webtest@gate4.canoo.com</u></font></tt></a><tt><fon=
t size=3D2><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 <</font></tt><a href=3Dmailto:mguillemot@yahoo.fr>=
<tt><font size=3D2 color=3Dblue><u>mguillemot@yahoo.fr</u></font></tt></a><=
tt><font size=3D2>><br>
> | Sent by: </font></tt><a href=3D"mailto:webtest-admin@gate4.canoo.com=
"><tt><font size=3D2 color=3Dblue><u>webtest-admin@gate4.canoo.com</u></fon=
t></tt></a><tt><font size=3D2><br>
> |<br>
> | 04/02/2008 05:34 AM<br>
> | Please respond to<br>
> | </font></tt><a href=3Dmailto:webtest@gate4.canoo.com><tt><font size=
=3D2 color=3Dblue><u>webtest@gate4.canoo.com</u></font></tt></a><tt><font s=
ize=3D2><br>
> |<br>
> | To<br>
> | </font></tt><a href=3Dmailto:webtest@gate4.canoo.com><tt><font size=
=3D2 color=3Dblue><u>webtest@gate4.canoo.com</u></font></tt></a><tt><font s=
ize=3D2><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: </font></tt><a href=3Dhttp://mguillem.wordpress.com/><tt><font=
size=3D2 color=3Dblue><u>http://mguillem.wordpress.com</u></font></tt></a>=
<tt><font size=3D2><br>
> |<br>
> |<br>
> | </font></tt><a href=3Dmailto:david.cate@wachovia.com><tt><font size=
=3D2 color=3Dblue><u>david.cate@wachovia.com</u></font></tt></a><tt><font s=
ize=3D2>
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 Webtest=
s<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 :)</font></tt>
<br></div>
--=_alternative 00517CFAC1257421_=--