REST API Testing using rest-assured

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

REST API Testing using rest-assured

Gopi Krishna Indraganti
Hi All,

I have few concerns while developing a framework to test the REST API webservices using rest-assured.

1. How can I do the assertions part for the following resource ?

URI: http://localhost:3000/api/People
Responsebody : [
  {
    "FirstName": "James",
    "LastName": "Joe",
    "Age": 30,
    "DOB": "2001-02-01T18:30:00.000Z",
    "id": 1
  },
  {
    "FirstName": "George",
    "LastName": "Bill",
    "Age": 30,
    "DOB": "2001-02-01T18:30:00.000Z",
    "id": 2
  }
]


In the above example, how can I assert all the response using TestNG ?

Could you please anyone help me on this..

Thanks
Gopi