Using SWIFT Tests

Writing effective test suites is hard. The complexity and runtime of a typical test suite increases slowly, and often you don’t realize you have a serious problem until it’s too late. Paying attention to detail in keeping individual tests simple and fast will pay off over time.

The goal of your test suite is to allow you to use tests to improve the design and for the existing tests to empower you to make changes with less fear of introducing new bugs. If your test suite is slow, complicated, or fragile, then you lose the ability of your tests to help you with either of these things. In the worst case, you can find yourself still needing to maintain a test suite but having that test suite slow down development because of ...

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.