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

Setting up a mock server

There are a couple of different ways in which you can create mock servers in Postman. In this section, I will show you how to set one up that is based on a specification file. This will be the primary use case that I cover in this chapter, but I will also make sure that you understand some of the other ways that you create mock servers as well.

Creating a mock server from a specification file

In the previous chapter, I walked you through how to set up an API specification for a to-do list API. You may want to go back to that chapter and see how that was done, or you can download the specification from the GitHub repository (https://github.com/PacktPublishing/API-Testing-and-Development-with-Postman) for this book and import it into Postman as a starting point. If you do create the API from the imported OpenAPI definition file, ensure that the Generate collection from imported APIs option is selected and set the Link this collection as option to Test...

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