[Webtest] Canoo + Grails
Dierk König
Dierk König
Wed, 2 Apr 2008 16:05:15 +0200 (CEST)
This is a multi-part message in MIME format.
------=_NextPart_000_00BA_01C894DB.57A48E90
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
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 :)
|
| _______________________________________________
| WebTest mailing list
| WebTest@lists.canoo.com
| http://lists.canoo.com/mailman/listinfo/webtest
|
|
|
------=_NextPart_000_00BA_01C894DB.57A48E90
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.5.7036.0">
<TITLE>RE: [Webtest] Canoo + Grails</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=3D2>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.code=
haus.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: webtest-admin@lists.canoo.com<BR>
| [<A =
HREF=3D"mailto:webtest-admin@lists.canoo.com">mailto:webtest-admin@lists.=
canoo.com</A>] 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 <mguillemot@yahoo.fr><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>
| <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 "<A =
HREF=3D"http://">http://</A>..."<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><=
BR>
|<BR>
|<BR>
| david.cate@wachovia.com 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>
|<BR>
| _______________________________________________<BR>
| WebTest mailing list<BR>
| WebTest@lists.canoo.com<BR>
| <A =
HREF=3D"http://lists.canoo.com/mailman/listinfo/webtest">http://lists.can=
oo.com/mailman/listinfo/webtest</A><BR>
|<BR>
|<BR>
| </FONT>
</P>
</BODY>
</HTML>
------=_NextPart_000_00BA_01C894DB.57A48E90--