Application Testing with Capybara

Application Testing with Capybara

by Matthew Robbins
     
 

View All Available Formats & Editions

In Detail

Everybody understands why implementing automated tests is important but at the same time developing them can be costly and time consuming, and tests can be also be fragile and prone to false positives. By using Capybara, you can develop robust tests quickly and run them in multiple drivers ensuring greater re-use; Capybaras API also extends the

…  See more details below

Overview

In Detail

Everybody understands why implementing automated tests is important but at the same time developing them can be costly and time consuming, and tests can be also be fragile and prone to false positives. By using Capybara, you can develop robust tests quickly and run them in multiple drivers ensuring greater re-use; Capybaras API also extends the human readable style made popular by frameworks such as Cucumber and RSpec.

"Application Testing with Capybara" takes you from installing the gem to getting up and running with a YouTube search scenario within the first two chapters. We then look deeper into the API, using Rack-Test for applications built with Rails or Sinatra and see how to test handle Asynchronous JavaScript and "black box" components such as Flash. Finally, we consider some advanced topics such as looking at alternatives to Selenium and accessing the native driver directly.

This book takes you from the basics of installing Capybara, through its API and onto advanced topics. You will learn how to use Capybaras extensive API to interact with your application, covering topics such as navigation, filling in forms, and querying your page for expected content. Beyond this we will consider why Capybara is so well suited to testing applications written in frameworks such as Rails and Sinatra. We will look at strategies for validating seemingly "untestable" components such as HTML5 or Flash by building out a testable API. Finally we will turn you into a Capybara ninja by covering advanced topics such as accessing functionality in the base driver, advanced driver configuration, and alternative flavours of drivers outside Selenium and Rack-Test.

Approach

Start performing integration testing with Capybara immediately. This book will get you up and running quickly and assumes no knowledge or experience of the technology.

Who this book is for

This book is for developers and testers who have had some exposure to Ruby but who want to know how to test their applications using Capybara and its compatible drivers, such as Selenium-Webdriver and Rack-Test. The examples are deliberately kept simple and example HTML mark-up is always included so that you can copy the examples to practice and experiment on your own machine.

Read More

Product Details

ISBN-13:
9781783281268
Publisher:
Packt Publishing
Publication date:
09/23/2013
Sold by:
Barnes & Noble
Format:
NOOK Book
File size:
916 KB

Meet the Author

Matthew Robbins is an experienced developer in testing, and having spent many years wrestling with commercially available test automation tools he has spent the last 5 years immersed in developing robust test automation frameworks using open source tools. He worked extensively with the BBC for a number of years developing test automation frameworks and tools across their web platform and continues to work in the media industry for other high profile broadcasters. Aside from test automation he is passionate about becoming more productive in Vim and learning about web browser internals.

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >