Hi Ken,

Am 12.09.10 23:09, schrieb Kenneth Kousen:
> Hi all,
>
> I've been playing around with some basic servlets (wow, how 1997, right?) to
> simulate how RESTful web services work.
>
> When testing SOAP-based web services, JDK 1.6 includes an Endpoint.publish()
> command that lets me start a tiny server in a regular Java app, and then in
> Gradle I can start that in my tests.  When I test JAX-RS web services,
> Jersey comes with an embeddable server called Grizzly, which lets me do
> something similar.  I've been wondering, though, if the JDK or Gradle
> included any way to do the same approach with basic servlets.
>
> One of the Gradle examples shows how to define a task that depends on
> jettyRun.  Calling that task builds a URL and accesses it.   That works, but
> the problem is that I have to embed all my testing code inside my Gradle
> task.  Plus the results don't show up as part of my overall test cases.
You could use an additional sourceSet for those integration tests. have
a look at http://bit.ly/9jEDAr
If you configure the according test task to be dependent on jettyRun you
can test your rest api using the gradle jetty plugin.

regards,
René



-- 
------------------------------------
Rene Groeschke

[email protected]
http://www.breskeby.com
http://twitter.com/breskeby
------------------------------------


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to