Skip to content
ariya edited this page Sep 23, 2012 · 26 revisions

One major use case of PhantomJS is headless testing of web applications. It is suitable for general command-line based testing, within a precommit hook, and as part as a continuous integration system.

Test Frameworks

PhantomJS itself is not a test framework, it is only used to launch the tests via a suitable test runner.

The following test frameworks have built-in support for PhantomJS.

For other test frameworks, various test runners/drivers are usually available:

In addition, there are projects which are built on top of PhantomJS to provide convenient high-level functionality for testing purposes:

  • Casper.js is useful to build scripted navigation and testing
  • Lotte adds jQuery-like methods, chaining, and more assertion logic
  • WebSpecter is a BDD-style acceptance test framework for web applications

Clone this wiki locally