Summary

In this chapter, we delved into the basics of testing web apps using Capybara and Selenium. We learned how to control a browser, interact with a website, query its contents, and make assertions about it. We also learned about the importance of a black-box testing strategy to today's web apps, which rely on JavaScript for all functionality. In the next chapter, we will draw on what we learned here to build a web app of our own, starting with integration (or acceptance) tests, following a methodology known as BDD. Then, in Chapter 8, Tackling the Challenges of End-to-end Testing, we will learn about some challenges related to end-to-end testing of web apps and solve them by adjusting both our app code and our tests.

Get RSpec Essentials 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.