java - Unit testing a JAX-RS Web Service? -
i'm looking ways create automated tests jax-rs (java api restful web services) based web service.
i need way send inputs , verify expected responses. i'd prefer via junit, i'm not sure how can achieved.
what approach use test web-services?
update: entzik pointed out, decoupling web service business logic allows me unit test business logic. however, want test correct http status codes etc.
jersey comes great restful client api makes writing unit tests easy. see unit tests in examples ship jersey. use approach test rest support in apache camel, if interested test cases here
Comments
Post a Comment