Search⌘ K

The Testing Layers

Explore the three main testing layers in Ruby on Rails applications. Understand how feature tests focus on user-visible behaviors, request tests verify behind-the-scenes actions, and unit tests isolate code units for reliable design. This lesson helps you plan and write efficient tests that cover your application from end to end.

We want to spend the least amount of time getting the most coverage from our tests.

The feature layer

The user stories we’ve learned about thus far translate perfectly to this particular type of test, the feature test. It’s the outer layer of the testing wheel.

We need to start with this layer. It’s what kicks off the implementation of every new feature. We take a new story from the board and put it into a text file, which ...