[Webtest] Canoo + Grails

david.cate@wachovia.com david.cate@wachovia.com
Wed, 2 Apr 2008 10:34:37 -0400


This is a multipart message in MIME format.
--=_alternative 005012FA8525741F_=
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Dierk,

        Thanks for responding. I'm very new to both Grails and Webtests -=20
just started both this week - but I love what I see. Webtests was very=20
simple to setup and get the exercises working with the XML configuration.=20
i got a project up and running under 37 groups of tests in a matter of=20
hours. I then used the property files and in-line parsing to replace=20
repetitive testing blocks and was generally pleased at how nice and=20
compact everything became.
        The project is being moved to Grails and so Webtests was a natural =

choice once again. Ok, so now the tests need to be converted. Shouldn't be =

a problem since I saw the section at the bottom on Groovy. After reading=20
the sections in both documents - yes I read them before posting - and=20
watching the Podcast and reading the Webalbum write-up and a few other=20
tutorials, it felt very shaky for the hand-off. I realize I'm very new and =

maybe some things are assumed about the knowledge of the reader.

Let me explain that better:
        1. the XML to Groovy command structure didn't seem naturally=20
explained. I picked up pretty quickly that the attributes are moved inside =

the parenthesis.
        2. Is every command available from inside Grails Webtest plug-in?
        3. The examples I've seen show a very quick 1 domain - get a=20
simple test running and now you're ready to tackle the world. It would be=20
nice to show how certain aspects get translated - how using in-line=20
parsing with Entities can be handled via imports (or can these still be=20
used?? - no idea). How are definitions handled. My biggest questions right =

now is more about normalizing the testing and stop writing repetitive=20
code.

I really like what I see with both products and feel they're a good fit=20
for our strategy. I also realize I have a lot of catching up to do and=20
basically would like to go find resources and try to figure most of this=20
out. I was just disappointed every time I read through a book, article,=20
podcast, webcast: the tests were very basic and right when they started to =

get interesting beyond the normal single domain/webtest - they stop. I=20
felt like someone sat me in a car explained how the gas works, how the=20
steering wheel works and then said I'm ready to drive and placed me on the =

highway.






Dierk K=F6nig <dierk.koenig@canoo.com>=20
Sent by: webtest-admin@gate4.canoo.com
04/02/2008 10:05 AM
Please respond to
webtest@gate4.canoo.com


To
<webtest@gate4.canoo.com>
cc

Subject
RE: [Webtest] Canoo + Grails






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
|
|=20
|
|
|
|
| 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
|
|
|=20

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


<br><font size=3D2 face=3D"sans-serif">Hi Dierk,</font>
<br>
<br><font size=3D2 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Thanks
for responding. I'm very new to both Grails and Webtests - just started
both this week - but I love what I see. Webtests was very simple to setup
and get the exercises working with the XML configuration. i got a project
up and running under 37 groups of tests in a matter of hours. I then used
the property files and in-line parsing to replace repetitive testing blocks
and was generally pleased at how nice and compact everything became.</font>
<br><font size=3D2 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; The
project is being moved to Grails and so Webtests was a natural choice once
again. Ok, so now the tests need to be converted. Shouldn't be a problem
since I saw the section at the bottom on Groovy. After reading the sections
in both documents - yes I read them before posting - and watching the Podca=
st
and reading the Webalbum write-up and a few other tutorials, it felt very
shaky for the hand-off. I realize I'm very new and maybe some things are
assumed about the knowledge of the reader.</font>
<br>
<br><font size=3D2 face=3D"sans-serif">Let me explain that better:</font>
<br><font size=3D2 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; 1.
the XML to Groovy command structure didn't seem naturally explained. I
picked up pretty quickly that the attributes are moved inside the parenthes=
is.</font>
<br><font size=3D2 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; 2.
Is every command available from inside Grails Webtest plug-in?</font>
<br><font size=3D2 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; 3.
The examples I've seen show a very quick 1 domain - get a simple test runni=
ng
and now you're ready to tackle the world. It would be nice to show how
certain aspects get translated - how using in-line parsing with Entities
can be handled via imports (or can these still be used?? - no idea). How
are definitions handled. My biggest questions right now is more about norma=
lizing
the testing and stop writing repetitive code.</font>
<br>
<br><font size=3D2 face=3D"sans-serif">I really like what I see with both p=
roducts
and feel they're a good fit for our strategy. I also realize I have a lot
of catching up to do and basically would like to go find resources and
try to figure most of this out. I was just disappointed every time I read
through a book, article, podcast, webcast: the tests were very basic and
right when they started to get interesting beyond the normal single domain/=
webtest
- they stop. I felt like someone sat me in a car explained how the gas
works, how the steering wheel works and then said I'm ready to drive and
placed me on the highway.</font>
<br>
<br>
<br>
<br>
<br>
<br>
<table width=3D100%>
<tr valign=3Dtop>
<td width=3D40%><font size=3D1 face=3D"sans-serif"><b>Dierk K=F6nig &lt;die=
rk.koenig@canoo.com&gt;</b>
</font>
<br><font size=3D1 face=3D"sans-serif">Sent by: webtest-admin@gate4.canoo.c=
om</font>
<p><font size=3D1 face=3D"sans-serif">04/02/2008 10:05 AM</font>
<table border>
<tr valign=3Dtop>
<td bgcolor=3Dwhite>
<div align=3Dcenter><font size=3D1 face=3D"sans-serif">Please respond to<br>
webtest@gate4.canoo.com</font></div></table>
<br>
<td width=3D59%>
<table width=3D100%>
<tr valign=3Dtop>
<td>
<div align=3Dright><font size=3D1 face=3D"sans-serif">To</font></div>
<td><font size=3D1 face=3D"sans-serif">&lt;webtest@gate4.canoo.com&gt;</fon=
t>
<tr valign=3Dtop>
<td>
<div align=3Dright><font size=3D1 face=3D"sans-serif">cc</font></div>
<td>
<tr valign=3Dtop>
<td>
<div align=3Dright><font size=3D1 face=3D"sans-serif">Subject</font></div>
<td><font size=3D1 face=3D"sans-serif">RE: [Webtest] Canoo + Grails</font><=
/table>
<br>
<table>
<tr valign=3Dtop>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=3D2>Hi David,<br>
<br>
The documentation of general Groovy usage with WebTest is<br>
under </font><a href=3Dhttp://webtest.canoo.com/webtest/manual/groovyTestin=
g.html><font size=3D2 color=3Dblue><u>http://webtest.canoo.com/webtest/manu=
al/groovyTesting.html</u></font></a><font size=3D2><br>
which in turns points to</font><font size=3D2 color=3Dblue><u><br>
</u></font><a href=3D"http://grails.codehaus.org/Functional+Testing"><font =
size=3D2 color=3Dblue><u>http://grails.codehaus.org/Functional+Testing</u><=
/font></a><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: webtest-admin@lists.canoo.com<br>
| [</font><a href=3D"mailto:webtest-admin@lists.canoo.com"><font size=3D2 c=
olor=3Dblue><u>mailto:webtest-admin@lists.canoo.com</u></font></a><font siz=
e=3D2>]
On Behalf Of<br>
| david.cate@wachovia.com<br>
| Sent: Mittwoch, 2. April 2008 14:39<br>
| To: webtest@gate4.canoo.com<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 &lt;mguillemot@yahoo.fr&gt;<br>
| Sent by: webtest-admin@gate4.canoo.com<br>
|<br>
| 04/02/2008 05:34 AM<br>
| Please respond to<br>
| webtest@gate4.canoo.com<br>
|<br>
| To<br>
| webtest@gate4.canoo.com<br>
| cc<br>
| Subject<br>
| Re: [Webtest] Canoo + Grails<br>
|<br>
| &nbsp; &nbsp; &nbsp;<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>
| &nbsp;doLogin(ant)<br>
| &nbsp;{<br>
| &nbsp; &nbsp;ant.group(description: 'perform login')<br>
| &nbsp; &nbsp;{<br>
| &nbsp; &nbsp; &nbsp;invoke &quot;</font><a href=3Dhttp:///><font size=3D2=
 color=3Dblue><u>http://</u></font></a><font size=3D2>...&quot;<br>
| &nbsp; &nbsp;}<br>
| &nbsp;}<br>
| }<br>
|<br>
| // SomeTest.groovy<br>
| import static Utility.*<br>
| ...<br>
| webtest('some test')<br>
| {<br>
| &nbsp;doLogin(ant)<br>
| &nbsp;...<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><a href=3Dhttp://mguillem.wordpress.com/><font size=3D2 colo=
r=3Dblue><u>http://mguillem.wordpress.com</u></font></a><font size=3D2><br>
|<br>
|<br>
| david.cate@wachovia.com wrote:<br>
| &gt;<br>
| &gt; I have Grails running with Canoo Webtest plugin installed.<br>
| Life is great<br>
| &gt; except my tests feel very repetitive. When I used Canoo Webtests<br>
| &gt; stand-alone, I used a lot of in-line parsing with the entity and
put<br>
| &gt; common tests in areas available to all. I know a lot of<br>
| work was going<br>
| &gt; on in the background to make those pieces available. Is<br>
| there a similar<br>
| &gt; process for the plugin for Grails? Is there a different way<br>
| to include<br>
| &gt; common tests?<br>
| &gt;<br>
| &gt; This may not the best forum to address the question, if<br>
| it's not please<br>
| &gt; let me know. There's not a whole lot of information that<br>
| discusses this<br>
| &gt; that i could find. I would love to be proven wrong -<br>
| especially if you<br>
| &gt; have the documentation available :)<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>
| </font><a href=3Dhttp://lists.canoo.com/mailman/listinfo/webtest><font si=
ze=3D2 color=3Dblue><u>http://lists.canoo.com/mailman/listinfo/webtest</u><=
/font></a><font size=3D2><br>
|<br>
|<br>
| </font>
<br>
--=_alternative 005012FA8525741F_=--