Executing Integration Tests
As you learned in Testing the Client Without Connecting to the API, executing the unit tests locally allows you to execute these tests frequently without touching the actual REST API. This is particularly useful when you’re working on a disconnected environment or when using third-party APIs. It also provides a controlled and repeatable environment where you can test different conditions that may not be possible with the actual API, such as error conditions.
This approach has a downside. If you missed a detail about the API or if the API changed, the application may not work properly, but the local tests will make you think it does. To overcome this challenge, you’ll run an integration test that connects to the ...
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.
Read now
Unlock full access