2

I am new to webservices testing and i am trying to test a webservice which returns both a JSON as well as XML output .

my management wants me to do this with jackson jersery and other libraries for XML

i created a java client using jersey and i got the response . i am not sure how to validate this response against a POJO class .

i am not entitled to use sophisticated libraries like rest assured or json path . can some one explain me how will i validate/assert both json and xml response against a POJO step by step and make my life easy ? kindly help also list down the libraries needed for handling xml responses too ?

  • 1
    If you are using Jersey framework to develop REST services then you can try Jersey Test Framework to test those services. – Jugal Panchal Mar 23 '17 at 18:46

1 Answers1

1

Karate is a new test-framework for testing web-services, and it supports both JSON and XML. You don't need to know Java and it does not need you to add any libraries. The documentation is extensive and the demo project has examples.

Disclaimer: am dev.

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248
  • bro i have said i want to know only the pojo ...pls read my request – user3252171 Mar 23 '17 at 19:51
  • I did read your request. If I were you I would convince the management would try Karate because it reduces ALL the complexity you described. But if you really need to use "the pojo" - well, all the best :P – Peter Thomas Mar 24 '17 at 02:49