Antwort: RE: [Webtest] Canoo + Grails

pompl@comnetmedia.de pompl@comnetmedia.de
Thu, 3 Apr 2008 13:40:53 +0200


Dies ist eine mehrteilige Nachricht im MIME-Format.
--=_alternative 00402B3BC1257420_=
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Niko,

> 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.

just search for "Any public interest in separating tests by  groups?" in=20
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>=20
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 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 :)
> |
> | =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
> | WebTest mailing list
> | WebTest@lists.canoo.com
> | http://lists.canoo.com/mailman/listinfo/webtest
> |
> |
> |
>


=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest


--=_alternative 00402B3BC1257420_=
Content-Type: text/html; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable


<br><font size=3D2 face=3D"sans-serif"><br>
Hi Niko,</font>
<br>
<br><tt><font size=3D2>&gt; Another question is (for may be including in
the documentation), how to<br>
&gt; define more than one test suites (beside the standard<br>
&gt; webtest/tests/TestSuite.groovy) and how to invoke them.</font></tt>
<br>
<br><font size=3D2 face=3D"sans-serif">just search for &quot;Any public int=
erest
in separating tests by &nbsp;groups?&quot; in the &quot;grails user&quot;
mailing list.</font>
<br>
<br><font size=3D2 face=3D"sans-serif">There is a patch which may solve your
problem.</font>
<br>
<br><font size=3D2 face=3D"sans-serif">I hope, it will be applied to a comi=
ng
grails version.</font>
<br>
<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>&quot;Niko Schmuck&qu=
ot;
&lt;niko.schmuck@nava.de&gt;</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 12:20</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">Dierk K=F6nig &lt;dierk=
.koenig@canoo.com&gt;</font>
<tr>
<td>
<div align=3Dright><font size=3D1 face=3D"sans-serif">Kopie</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">Thema</font></div>
<td valign=3Dtop><font size=3D1 face=3D"sans-serif">RE: [Webtest] Canoo + G=
rails</font></table>
<br>
<table>
<tr valign=3Dtop>
<td>
<td></table>
<br></table>
<br>
<br>
<br><tt><font size=3D2>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>
&gt; Hi David,<br>
&gt;<br>
&gt; The documentation of general Groovy usage with WebTest is<br>
&gt; under http://webtest.canoo.com/webtest/manual/groovyTesting.html<br>
&gt; which in turns points to<br>
&gt; http://grails.codehaus.org/Functional+Testing<br>
&gt; for the Grais specifics.<br>
&gt;<br>
&gt; Could you give a list of topics that are not covered by these<br>
&gt; pages?<br>
&gt;<br>
&gt; much appreciated<br>
&gt; Dierk<br>
&gt;<br>
&gt; | -----Original Message-----<br>
&gt; | From: webtest-admin@lists.canoo.com<br>
&gt; | [mailto:webtest-admin@lists.canoo.com] On Behalf Of<br>
&gt; | david.cate@wachovia.com<br>
&gt; | Sent: Mittwoch, 2. April 2008 14:39<br>
&gt; | To: webtest@gate4.canoo.com<br>
&gt; | Subject: Re: [Webtest] Canoo + Grails<br>
&gt; |<br>
&gt; |<br>
&gt; | Marc, thank you for the response - got it working<br>
&gt; | beautifully. I've noticed that while the Canoo documentation<br>
&gt; | is fairly thorough with the exception of the Grails portion<br>
&gt; | and even Grails skips around the functional testing portion as well.=
<br>
&gt; |<br>
&gt; | 1. Are there any sites or guides that give a good overview of<br>
&gt; | custom functional testing for Webtests in Grails?<br>
&gt; | 2. This is just to confirm something: the XML patterns for<br>
&gt; | specifying the tests are not available with the Grails plugin<br>
&gt; | - correct? If I create my tests within the XML using<br>
&gt; | definitions and entity replacements - I would then need to<br>
&gt; | change those tests to use the method described below?<br>
&gt; |<br>
&gt; |<br>
&gt; |<br>
&gt; |<br>
&gt; | Marc Guillemot &lt;mguillemot@yahoo.fr&gt;<br>
&gt; | Sent by: webtest-admin@gate4.canoo.com<br>
&gt; |<br>
&gt; | 04/02/2008 05:34 AM<br>
&gt; | Please respond to<br>
&gt; | webtest@gate4.canoo.com<br>
&gt; |<br>
&gt; | To<br>
&gt; | webtest@gate4.canoo.com<br>
&gt; | cc<br>
&gt; | Subject<br>
&gt; | Re: [Webtest] Canoo + Grails<br>
&gt; |<br>
&gt; |<br>
&gt; |<br>
&gt; |<br>
&gt; |<br>
&gt; |<br>
&gt; | Hi,<br>
&gt; |<br>
&gt; | the mailing list is fully correct.<br>
&gt; |<br>
&gt; | In Grails you can just extract common step sequences in<br>
&gt; | utility methods like<br>
&gt; |<br>
&gt; | // Utility.groovy<br>
&gt; | class Utility<br>
&gt; | {<br>
&gt; | &nbsp;doLogin(ant)<br>
&gt; | &nbsp;{<br>
&gt; | &nbsp; &nbsp;ant.group(description: 'perform login')<br>
&gt; | &nbsp; &nbsp;{<br>
&gt; | &nbsp; &nbsp; &nbsp;invoke &quot;http://...&quot;<br>
&gt; | &nbsp; &nbsp;}<br>
&gt; | &nbsp;}<br>
&gt; | }<br>
&gt; |<br>
&gt; | // SomeTest.groovy<br>
&gt; | import static Utility.*<br>
&gt; | ...<br>
&gt; | webtest('some test')<br>
&gt; | {<br>
&gt; | &nbsp;doLogin(ant)<br>
&gt; | &nbsp;...<br>
&gt; | }<br>
&gt; |<br>
&gt; | (my mailer still doesn't compile, syntax error are possible ;-))<br>
&gt; |<br>
&gt; | When you're utility methods are located directly in your<br>
&gt; | class (or in some parent class), you don't need to pass ant<br>
&gt; | as parameter.<br>
&gt; |<br>
&gt; | Cheers,<br>
&gt; | Marc.<br>
&gt; | --<br>
&gt; | Blog: http://mguillem.wordpress.com<br>
&gt; |<br>
&gt; |<br>
&gt; | david.cate@wachovia.com wrote:<br>
&gt; | &gt;<br>
&gt; | &gt; I have Grails running with Canoo Webtest plugin installed.<br>
&gt; | Life is great<br>
&gt; | &gt; except my tests feel very repetitive. When I used Canoo Webtest=
s<br>
&gt; | &gt; stand-alone, I used a lot of in-line parsing with the entity
and put<br>
&gt; | &gt; common tests in areas available to all. I know a lot of<br>
&gt; | work was going<br>
&gt; | &gt; on in the background to make those pieces available. Is<br>
&gt; | there a similar<br>
&gt; | &gt; process for the plugin for Grails? Is there a different way<br>
&gt; | to include<br>
&gt; | &gt; common tests?<br>
&gt; | &gt;<br>
&gt; | &gt; This may not the best forum to address the question, if<br>
&gt; | it's not please<br>
&gt; | &gt; let me know. There's not a whole lot of information that<br>
&gt; | discusses this<br>
&gt; | &gt; that i could find. I would love to be proven wrong -<br>
&gt; | especially if you<br>
&gt; | &gt; have the documentation available :)<br>
&gt; |<br>
&gt; | =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
<br>
&gt; | WebTest mailing list<br>
&gt; | WebTest@lists.canoo.com<br>
&gt; | http://lists.canoo.com/mailman/listinfo/webtest<br>
&gt; |<br>
&gt; |<br>
&gt; |<br>
&gt;<br>
<br>
<br>
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F<br>
WebTest mailing list<br>
WebTest@lists.canoo.com<br>
http://lists.canoo.com/mailman/listinfo/webtest<br>
</font></tt>
<br>
--=_alternative 00402B3BC1257420_=--