Testing against external systems

So far, we have learned a simple technique to maintain the integrity of our test doubles. The problem comes when we need to implement a system that should implement the interfaces represented by these doubles.

Actually, the really problematic case is when we need to test against an external system, because we cannot make a test double for the external system, the database, or the platform. After all, we are trying to test the code layer that talks directly with them. We have reached the boundary not only of our system, but also of our runtime. In these cases, we can only test this code in integration with the external system, so we need an integration test. The following figure illustrates testing against external ...

Get Learning Behavior-driven Development with JavaScript now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.