-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Test Automation Engineering Handbook
By :

Postman allows us to add tests that run automatically after an API response is returned from the server. This can be done through the Tests tab in the Postman request dashboard. We will be using the following three GitHub API requests in this section to help us set up and understand automated API response validation:
In the next section, let us review how to use snippets to speed up our test automation process.
Postman comes with pre-defined JavaScript test scripts in the form of code snippets that can directly be used in our tests. Let us start by adding snippets for some of the basic checks performed on an API response. Snippets are shown on the right pane next to the various tabs on the request dashboard.
Every API test requires the validation of the status of an API response, and Postman provides a...