What to Test in an Integration Test

We’ve talked before about the idea of the testing pyramid (see the following figure), where your tests have a relatively large number of unit tests that run quickly and test one small segment of the application, backed by significantly fewer integration tests that run more slowly over the application as a whole.

images/pyramid.png

The pyramid metaphor makes it sound like the integration tests sit passively on top of a foundation of unit tests. It may be more useful to think of integration tests as the frame of a house. Without integration tests, you can’t specify how your application works together. Without unit tests there ...

Get Rails 4 Test Prescriptions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.