Browser testing

Buster.JS offers multiple ways of running your tests in browsers. This document describes three ways, ranging from simple setup to most useful (if that’s a scale).

Running with buster server

Inspired by JsTestDriver, Buster.JS can automate browsers seamlessly and provide feedback anywhere you want, making running your tests in actual browsers easy and painless. Hell, it even makes it fun.

../_images/buster-server-start.png ../_images/buster-server-capture-firefox.png ../_images/buster-test-run-browsers.png

Running with buster static


This is still an experimental feature, but should work fine.

In the cases where you need a simpler method for running tests, but don’t care for the manual HTML scaffold (see next section), Buster.JS can serve the scaffold for your based on your configuration.

../_images/buster-static-start.png ../_images/buster-static-success.png

Using an HTML scaffold


This is still an experimental feature, but should work fine.

The simplest way to try Buster.JS is to copy the following code, save it to a file and run it in a browser:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <script type="text/javascript" src=""></script>
    <script type="text/javascript" src=""></script>
    <script type="text/javascript" src=""></script>

Go ahead, try it.

If you use Git, you can clone this example to your machine:

git clone git:// gist-1904218


If you opt for downloading the script locally, remember to get the CSS filetoo. When using the pre-built library, there’s no installation, but you also miss out on much of the automation sweetness.

Running headless with PhantomJS


This feature has not yet landed in the beta.

Table Of Contents

Related Topics

This Page