YUI recommends YUI 3.

YUI 2 has been deprecated since 2011. This site acts as an archive for files and documentation.

Yahoo! UI Library

yuitest  2.3.0

Yahoo! UI Library > yuitest > YAHOO.tool.TestRunner

Show Private Show Protected

static Class YAHOO.tool.TestRunner

Runs test suites and test cases, providing events to allowing for the interpretation of test results.

Methods

_run

private static Object _run ( testObject )
Runs a test case or test suite, returning the results.
Parameters:
testObject <YAHOO.tool.TestCase|YAHOO.tool.TestSuite> The test case or test suite to run.
Returns: Object
Results of the execution with properties passed, failed, and total.

_runTestCase

private static Object _runTestCase ( testCase )
Runs a given test case.
Parameters:
testCase <YAHOO.tool.TestCase> The test case to run.
Returns: Object
Results of the execution with properties passed, failed, and total.

_runTestSuite

private static Object _runTestSuite ( testSuite )
Runs all the tests in a test suite.
Parameters:
testSuite <YAHOO.tool.TestSuite> The test suite to run.
Returns: Object
Results of the execution with properties passed, failed, and total.

add

void add ( testObject )
Adds a test suite or test case to the list of test objects to run.
Parameters:
testObject <object> Either a TestCase or a TestSuite that should be run.
Returns: void

clear

void clear ( )
Removes all test objects from the runner.
Returns: void

run

void run ( )
Runs the test suite.
Returns: void

Events

begin

begin ( )
Fires when the run() method is called.

complete

complete ( )
Fires when all test suites and test cases have been completed.

fail

fail ( )
Fires when a test has failed.

ignore

ignore ( )
Fires when a test has been ignored.

pass

pass ( )
Fires when a test has passed.

testcasebegin

testcasebegin ( )
Fires when a test case is opened but before the first test is executed.

testcasecomplete

testcasecomplete ( )
Fires when all tests in a test case have been executed.

testsuitebegin

testsuitebegin ( )
Fires when a test suite is opened but before the first test is executed.

testsuitecomplete

testsuitecomplete ( )
Fires when all test cases in a test suite have been completed.


Copyright © 2007 Yahoo! Inc. All rights reserved.