If you're using Maven, my JPA code sample can show how to set up / activate integration tests: http://www.jroller.com/gmazza/entry/jpa_and_junit, https://github.com/gmazza/blog-samples/tree/master/jpa_and_junit (has nothing to do with REST or Jetty though)

HTH,
Glen

On 07/12/2013 12:28 PM, KARR, DAVID wrote:
-----Original Message-----
From: gigi2 [mailto:[email protected]]
Sent: Thursday, July 11, 2013 12:02 PM
To: [email protected]
Subject: use one embedded jetty instance for all CXF tests

Hello, CXF gurus,

We have implemented a RESTful web services using CXF. Many unit tests are
using embedded jetty server created by CXF that hosts the endpoints as
configured. The configuration files of the jetty are

META-INF/cxf/cxf-extension-http-jetty.xml
META-INF/cxf/cxf.xml

As more and more tests are added, it takes a long time to run these tests.
We are just wondering if there is way to use maven to start/stop the jetty
server for these tests therefore they are not started/stopped by each test.
You also might consider the fact that these are not unit tests, they are 
integration tests.  You would get more effective testing done if you 
restructured your code and tests so that you can validate the bulk of your 
business logic using pure unit tests.


Reply via email to