Hi Dierk,
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.
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 Podcast 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.
Let me explain that better:
1. the XML to Groovy command structure didn't seem naturally
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
simple test running 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 normalizing the testing and stop writing repetitive
code.
I really like what I see with both products 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.
Dierk König <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
04/02/2008 10:05 AM
Please respond to
[EMAIL PROTECTED]
To
<[EMAIL PROTECTED]>
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: [EMAIL PROTECTED]
| [mailto:[EMAIL PROTECTED] On Behalf Of
| [EMAIL PROTECTED]
| Sent: Mittwoch, 2. April 2008 14:39
| To: [EMAIL PROTECTED]
| 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 <[EMAIL PROTECTED]>
| Sent by: [EMAIL PROTECTED]
|
| 04/02/2008 05:34 AM
| Please respond to
| [EMAIL PROTECTED]
|
| To
| [EMAIL PROTECTED]
| 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
|
|
| [EMAIL PROTECTED] 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
| [email protected]
| http://lists.canoo.com/mailman/listinfo/webtest
|
|
|