On Nov 26, 2007, at 11:54 PM, Walton, Lynn wrote:
Well, I did find the grails.util.WebTest class …. Didn’t realize it
was a plug-in. Would still love to see a sample on how to make a
groovy web test use modules.
Thanks
I'll second that! I currently have a project where mixing ant tests
and groovy steps is becoming quite messy.
If the whole project were written in grails style webtests it would
solve a lot of issues.
Lynn, I'd be interested to hear about your progress in this.
Stephen
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
] On Behalf Of Walton, Lynn
Sent: Monday, November 26, 2007 2:52 PM
To: [EMAIL PROTECTED]
Subject: [Webtest] Grails like Groovy testing in non-grails project
Has there been anything new regarding the ability to do canoo
webtests in a non grails project? I’ve used webtest in years past
but now that I’m already writing groovy tests for a java (not
grails) project, I’d love to write my webtests in groovy.
I read the thread back in May 2007 at:
http://lists.canoo.com/pipermail/webtest/2007q2/008177.html
Marc said in that thread:
In fact you can just write your own base WebTestCase using an ant
builder that does just what is done in Grails or what is done in
WEBTEST_HOME/webtest.xml (lib/useWebTest.xml is deprecated and will
disappear). The smartest way would be to import this file in current
AntBuilder but this doesn't work currently (see recent discussion in
Groovy User mailing list). In the mean time you have to do it by
yourself ;-)
I downloaded the Grails src in an attempt to write my own as Marc
suggested and can’t find the grails.util.WebTest class that the
grails web tests are supposed to extend.
Can anyone help get me started?
Also, although the example at http://webtest.canoo.com/webtest/manual/groovyTesting.html
is helpful,
I’d love to see it go one step further, to shows how one would
compose a test of other “modules” the way you do in xml by using
entities like UseCases/LoginAndStep.xml example:
<?xml version="1.0"?>
<!DOCTYPE project [
<!ENTITY login SYSTEM "file:../modules/login.xml">
<!ENTITY step SYSTEM "file:../modules/step.xml">
]>
<project name="loginAndStep" default="case" basedir="..">
<target name="case">
<webtest name="loginAndStep">
&config;
<steps>
&login;
&step;
</steps>
</webtest>
</target>
</project>
Thanks,
Lynn
This message and any attachments are intended only for the use of
the addressee and may contain information that is privileged and
confidential. If the reader of the message is not the intended
recipient or an authorized representative of the intended recipient,
you are hereby notified that any dissemination of this communication
is strictly prohibited. If you have received this communication in
error, please notify us immediately by e-mail and delete the message
and any attachments from your system.
This message and any attachments are intended only for the use of
the addressee and may contain information that is privileged and
confidential. If the reader of the message is not the intended
recipient or an authorized representative of the intended recipient,
you are hereby notified that any dissemination of this communication
is strictly prohibited. If you have received this communication in
error, please notify us immediately by e-mail and delete the message
and any attachments from your system.
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest