|
![]() |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.thefrontside.crosscheck.Runner
Controls the configuration and execution of a suite of tests across a set of multiple browsers. Which tests will be run are first specified by adding test elements to the Runner object which are either files or directories that will define test cases. Which browser environments against which to run the battery of tests are also configurable. example:
Runner runner = new Runner(); runner.addBrowser(Browser.IE6); runner.addBrowser(Browser.MOZILLA_1_8) runner.addSuiteListener(new MySuiteListener()) runner.run()Runner also comes with a main method which will treat its arguments as the names of test elements, and provides a default console reporting mechanism to track the results of the testcases as they happen. example:
java net.thefrontside.crosscheck.Runner tests/FirstTest.js tests/SecondTest.js tests/test-dir
| Constructor Summary | |
Runner()
|
|
| Method Summary | |
void |
addBrowser(Browser browser)
Add a browser environment to run the tests contained in this runner against. |
void |
addSuiteListener(CrosscheckListener listener)
Add a CrosscheckListener to this Runner, which will be notified of events corresponding to the status
of tests as they happen |
void |
addTestElement(java.lang.String element)
Add either a file or a directory (relative to the current working directory) to the set of test sources which will be loaded when running each battery of tests. |
static void |
main(java.lang.String[] args)
Creates a Runner configured to run all known browsers; calls addTestElement for each member of args. |
void |
run()
Execute all of the tests specied in the test elements of this runner against all of the browsers specified by addBrowser. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Runner()
| Method Detail |
public void addTestElement(java.lang.String element)
element is a file,
it will be interpreted as javascript. If it is a directory, it will scan the directory for all files
ending with "Test.js", and will interpret each file as javascript.
element - file or directory containing scripts to build tests.public void addSuiteListener(CrosscheckListener listener)
CrosscheckListener to this Runner, which will be notified of events corresponding to the status
of tests as they happen
listener - the listener to add to this Runner.public static void main(java.lang.String[] args)
args.
and executes against every browser environment.
args - a list of test elements (files or directories) containing test cases.public void addBrowser(Browser browser)
browser - the browser environment against which the tests will be run.public void run()
CrosscheckListeners of this
Runner as they happen.
|
The inevitable future of AJAX. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||