Search⌘ K

A Field Guide to Integration and System Tests

Explore integration and system testing techniques in Rails, focusing on tests that simulate user interactions and verify application output without JavaScript. Understand the distinctions between different test types and tools like Capybara and RSpec to enhance your testing skills.

The last few chapters

We spent the last few chapters focusing on testing the models and business logic of the Rails application. A web application is more than just business logic, though. So for the next few chapters, we’ll discuss tests that tackle the parts of the application that either respond to user input or output data to the user.

Input and output tests

There are many different terminologies used to describe the various flavors of input and output tests we can write. First, there are generic terms that are not inherent to Rails but are terms we might apply to any testing:

  • An integration test is any test that covers more than one part of the application working together.

  • An end-to-end test is a specific kind of integration test covering the system’s entire behavior ...