Let's say our app uses a service that we don't trust.
How do we deal with it?
The less we trust a counterpart (e.g., APIs, remote servers, databases, file systems), the more we should rely on end-to-end tests to get ahead of breakage and reduce risks. (2/11)
How do we deal with it?
The less we trust a counterpart (e.g., APIs, remote servers, databases, file systems), the more we should rely on end-to-end tests to get ahead of breakage and reduce risks. (2/11)
Comments
Simply put, by writing more of them, and increasing the frequency that they run in CI. (3/11)
Let's say our app relies on a remote API service (like a Weather API), and the service owners introduce breaking changes in their next update without giving us adequate forewarning.
(4/11)
(5/11)
If we are using GitHub Actions as our CI server, then we maybe we run these tests everyday, or even twice a day! (6/11)
🧪 What are End-to-End Tests?
These are tests that check our system against other services, like remote APIs. They hit the real services that our app uses.
For example, we might make a real network request to that Weather API using a real instance of Foundation.URLSession. (7/11)
⏱️ Response time tests to ensure the API responds within an acceptable time frame.
❌ Error handling tests to verify that the app properly handles API errors (e.g., 4xx, 5xx responses). (8/11)