0

I want to tests my rest services by junit. The services are in BnD bundle(Felix).Actually, I want to write test cases for rest url. Can you suggests me any doc or can you tell me how can I do this.

Please remember, My project in BnD bundles.

priya
  • 19
  • 6
  • can you show a example of your REST service and what effort have you done so far with your BnD bundle? also is your Bnd bundle this? http://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html – kulkarniankita Feb 18 '16 at 15:54

1 Answers1

0

if your need is to call a REST service, wherever it is deployed or bundled, you can use rest-assured, which is a simple library to test REST (HTTP in fact) services. For instance, you can do:

given().
    parameters("firstName", "John", "lastName", "Doe").
when().
    post("/greetMe").
then().
    body(hasXPath("/greeting/firstName[text()='John']")).

I use it extensively on a daily basis, it is really feature complete.

cdelmas
  • 840
  • 8
  • 15