Skip to Content
Design and Build Great Web APIs
book

Design and Build Great Web APIs

by Mike Amundsen
October 2020
Intermediate to advanced
358 pages
8h 39m
English
Pragmatic Bookshelf
Content preview from Design and Build Great Web APIs

Solution for Chapter 9: Testing APIs

In the exercise for this chapter (Chapter 9, Testing APIs), your task is to create a Postman test collection for your credit-check API project and write two tests: a “happy path” test for the Home resource (http://localhost:8181/) and a “sad path” test for the From resource (http://localhost:8181/form/). You were supplied with extensive instructions for each test.

For extra credit, you were given the task to export the completed tests and use the newman command-line utility to run the tests locally.

Note: Before you start this exercise, make sure your local version of the credit-check API that you built in the last chapter is up and running. You can use the copy of that service in the /testing/exercises/before/credit-check ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Designing Web APIs

Designing Web APIs

Brenda Jin, Saurabh Sahni, Amir Shevat

Publisher Resources

ISBN: 9781680508123Errata Page