Start With High-Level Tests — Tom Dalling

13-May-2021 1297
There are different kinds of tests, and each kind can be placed on a continuum from high-level to low-level. High-level tests cover a larger portion of the codebase, and tend to exercise application features in a way that is closer to how a real user would. Low level tests cover small units of the codebase, often in isolation, and tend to exercise programmatic interfaces of internal implementation details.In the context of a Rails application, the kinds of tests can be roughly ordered:Highest: System/feature/end-to-end testsRequest/controller testsTests for commands, interactors, background jobs, or other business logicTests for individual models, views, or other small componentsLowest: Isolated unit tests for individual classes, often POROs, where all dependencies have been mocked out.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle