forked from ariya/phantomjs
-
Notifications
You must be signed in to change notification settings - Fork 1
Headless Testing
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.
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:
- Capybara: Poltergeist
- Mocha: mocha-phantomjs
- Jasmine: grunt-jasmine-runner, guard-jasmine, phantom-jasmine
- Robot Framework: phantomrobot
- WebDriver: GhostDriver
- YUITest: Grover, phantomjs-yuitest
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