[Webtest] Groovy Integration Questions

geojohn@lexmark.com geojohn@lexmark.com
Tue, 1 Jul 2008 11:48:40 -0400


This is a multipart message in MIME format.
--=_alternative 0056DA8985257479_=
Content-Type: text/plain; charset="US-ASCII"

Hello all,

I'm researching WebTest's feasibility for use in the testing of some web 
interfaces. We've achieved some very nice results with WebTest, and we 
like it, but we also feel that in some cases the use of XML is holding us 
back. We want functions which accept parameters and return values 
(includes and properties are not a good substitute), we need more data 
types (hashes, arrays, etc), we want more extensibility with third-party 
libraries, etc. It seems that WebTest's integration with Groovy would 
offer us the desired functionality.

Unfortunately, as far as I can tell, the use of WebTest with Groovy is not 
very well-documented. I was hoping that perhaps you could help me out by 
answering some questions.

1.) Can Groovy code return data to XML-based tests, somehow? Perhaps via 
ANT properties?
2.) Is it possible to write a class in Groovy, then call its functions 
directly from WebTest XML files?
2.) How does one organize a test suite written in Groovy? It doesn't seem 
that using build.xml etc would be valid.
3.) Is it better to create a Groovy test suite using WebTest and the 
WebTest file structure, or is it better to create a Grails project and 
import the WebTest functionality from an external source?
3.) Does anyone have an example/proof-of-concept test suite written 
predominately in Groovy which they might be willing to share?
4.) Are there major drawbacks to using a 100% Groovy code base as opposed 
to WebTest's XML based tests?

Thank you all for your help. Your input is greatly appreciated.

Thanks,
George Johnson
--=_alternative 0056DA8985257479_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Hello all,</font>
<br>
<br><font size=2 face="sans-serif">I'm researching WebTest's feasibility
for use in the testing of some web interfaces. We've achieved some very
nice results with WebTest, and we like it, but we also feel that in some
cases the use of XML is holding us back. We want functions which accept
parameters and return values (includes and properties are not a good substitute),
we need more data types (hashes, arrays, etc), we want more extensibility
with third-party libraries, etc. It seems that WebTest's integration with
Groovy would offer us the desired functionality.</font>
<br>
<br><font size=2 face="sans-serif">Unfortunately, as far as I can tell,
the use of WebTest with Groovy is not very well-documented. I was hoping
that perhaps you could help me out by answering some questions.</font>
<br>
<br><font size=2 face="sans-serif">1.) Can Groovy code return data to XML-based
tests, somehow? Perhaps via ANT properties?</font>
<br><font size=2 face="sans-serif">2.) Is it possible to write a class
in Groovy, then call its functions directly from WebTest XML files?</font>
<br><font size=2 face="sans-serif">2.) How does one organize a test suite
written in Groovy? It doesn't seem that using build.xml etc would be valid.</font>
<br><font size=2 face="sans-serif">3.) Is it better to create a Groovy
test suite using WebTest and the WebTest file structure, or is it better
to create a Grails project and import the WebTest functionality from an
external source?</font>
<br><font size=2 face="sans-serif">3.) Does anyone have an example/proof-of-concept
test suite written predominately in Groovy which they might be willing
to share?</font>
<br><font size=2 face="sans-serif">4.) Are there major drawbacks to using
a 100% Groovy code base as opposed to WebTest's XML based tests?</font>
<br>
<br><font size=2 face="sans-serif">Thank you all for your help. Your input
is greatly appreciated.</font>
<br>
<br><font size=2 face="sans-serif">Thanks,</font>
<br><font size=2 face="sans-serif">George Johnson</font>
--=_alternative 0056DA8985257479_=--