This package provides wrappers for the Buster.js server and test runner that integrate bits of selenium to control the capture of Buster slaves. It also provides wrappers for running Buster.js tests as a part of a Python test suite and further integration with zope.testrunner for doing test discovery and testing layers for controlling the buster-server and capturing Buster.JS browser slaves.
The buster_selenium.case.BusterJSTestCase class is a sub-class of unittest.TestCase and can be used to create Python test cases that will run a Buster.JS test suite corresponding to one buster.js test configuration:
>>> from buster_selenium import case >>> def suite(): >>> suite = unittest.TestSuite() ... suite.addTest( ... case.BusterJSTestCase('/path/to/buster.js')) ... return suite
The test case will start buster-server, launch a browser, and capture a browser slave in the test setUp. Then it will invoke buster-test passing the buster.js config file and will report failure if buster-test exits with a status code of 1 or will report erro if it exits with any other non-zero status code. Finally, it will shutdown the browser slave and the buster-server.
The BusterJSTestCase class uses a few environment variables to control how the buster-test executable is invoked and what is done with its output:
The buster-selenium package provides a buster-testrunner console script which adds discovery of Buster.JS tests to the zope.testrunner support for automatically finding tests throughout a project. In particular, it will create test suites from any directory under a valid buster-testrunner --test-path that has a buster.js file:
$ buster-testrunner --test-path=/path/to/project/module --test-path=/path/to/project/other-module
See the zope.testrunner docs or buster-testrunner --help for more details on controlling test discovery and which tests are run.
If the selenium Python package is available, by default the BusterJSTestCase and testing layer support described above will use selenium.webdriver to open, capture, and clean up a browser slave. The way that selenium.webdriver launches browsers provides an additional degree of isolation from user extensions, profiles, themes, and other add-ons and provides greater isolation for Buster.JS tests.
TODO: Figure out how to actually get changelog content.
Changelog content for this version goes here.