Book Image

Backbone.js Testing

By : Ryan Glenn Roemer
Book Image

Backbone.js Testing

By: Ryan Glenn Roemer

Overview of this book

Table of Contents (13 chapters)
Backbone.js Testing
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Automating browser environments


Having introduced some motivating use cases, we now turn to the nuts and bolts of automating our test infrastructure. We will cover the following techniques for programmatically driving our Backbone.js tests:

  • Remote controlling tests in a real web browser

  • Running tests in a browser simulation library

  • Executing tests in a headless web browser environment

  • Combining the first three approaches

Remote controlled web browsers

The most comprehensive automation technique is to remotely control a web browser. Remote control means that a program does what a human can do using a real web browser—opening the browser to a given page, clicking on links, filling in inputs, and so on.

One of the most popular remote control frameworks is Selenium (http://docs.seleniumhq.org/). Selenium provides many web drivers, which are programmatic adapters that hook into a real web browser and trigger actions through the normal user interface. Selenium supports a diverse array of environments...