Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
API Testing and Development with Postman

You're reading from   API Testing and Development with Postman A practical guide to creating, testing, and managing APIs for automated software testing

Arrow left icon
Product type Paperback
Published in May 2021
Publisher Packt
ISBN-13 9781800569201
Length 340 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Dave Westerveld Dave Westerveld
Author Profile Icon Dave Westerveld
Dave Westerveld
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Section 1: API Testing Theory and Terminology
2. Chapter 1: API Terminology and Types FREE CHAPTER 3. Chapter 2: Principles of API Design 4. Chapter 3: OpenAPI and API Specifications 5. Chapter 4: Considerations for Good API Test Automation 6. Section 2: Using Postman When Working with an Existing API
7. Chapter 5: Understanding Authorization Options 8. Chapter 6: Creating Test Validation Scripts 9. Chapter 7: Data-Driven Testing 10. Chapter 8: Running API Tests in CI with Newman 11. Chapter 9: Monitoring APIs with Postman 12. Chapter 10: Testing an Existing API 13. Section 3: Using Postman to Develop an API
14. Chapter 11: Designing an API Specification 15. Chapter 12: Creating and Using a Mock Server in Postman 16. Chapter 13: Using Contract Testing to Verify an API 17. Chapter 14: Design and Create an API 18. Other Books You May Enjoy

Checking API responses

Since Postman uses JavaScript for the checks in a test, it has a lot of power and flexibility built into it. I'm going to walk you through various things that you can do with this. In order to do that, it will be easiest to work with actual API calls. For that purpose, I will once again use the Star Wars API (https://swapi.dev). If you don't have one yet, create a collection in Postman called something like Star Wars API – Chapter 6 and in that collection create a request called Get First Person. This request should call the /people/1 endpoint from the Star Wars API. You can also download the collection from the GitHub repository for this course (https://github.com/PacktPublishing/API-Testing-and-Development-with-Postman/tree/master/Chapter06) and then import that package, if you would prefer.

When I made this collection, I also created a variable called base_url that specifies the base URL for this. I will be creating a few different requests...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image