The REST API Testing Checklist Overview: API stands for “Application Programming Interface”. It is a program that allows the client and servers to talk to each other. REST defines how API looks like. REST is “Representational State Transfer”. There are rules followed by the developers for creating an API. The URL is called a Request while the data sent back to you is called a Response from the server. Some Request Methods are : • • • •
GET: Used to get a response from a server. POST: Used to create new data on the server. PUT: Used to update data into the server. DELETE: Used to delete data from the server.
Some Benefits of API Testing are: • • • •
Early Testing which results in early feedback and better team productivity. Language is independent of making the verification of data fast and stable. Faster Releases as compared to UI Testing. High Coverage of Testing.
Steps for Testing REST API: Step 1): Install Postman and after installation launch the app. Step 2): Enter the API URL in the URL textbox. Step 3): Select the Http method for every API you hit- e.g. POST Step 4): Provide Headers details, in the Headers section. Step 5): Now open the Body tab and select raw. Step 6):Enter the request data in JSON format. e.g. {“key1″:”value1″,”key2″:”value2”}.