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

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -