add
static
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.
clear
static
Void
clear
(
)
Removes all test objects from the runner.
disableLogging
static
Void
disableLogging
(
)
Disable logging via Y.log(). Test output will not be visible unless
TestRunner events are subscribed to.
enableLogging
static
Void
enableLogging
(
)
Enable logging via Y.log(). Test output is published and can be read via
logreader.
getCoverage
Object|String
getCoverage
(
format
)
Returns the coverage report for the files that have been executed.
This returns only coverage information for files that have been
instrumented using YUI Test Coverage and only those that were run
in the same pass.
- Parameters:
-
format <Function>
(Optional) A coverage format to return results in.
- Returns:
Object|String
- Either the coverage object or, if a coverage format is specified, a string representing the results in that format.
getName
String
getName
(
)
Retrieves the name of the current result set.
- Returns:
String
- The name of the result set.
getResults
Object|String
getResults
(
format
)
Returns the last complete results set from the TestRunner. Null is returned
if the TestRunner is running or no tests have been run.
- Parameters:
-
format <Function>
(Optional) A test format to return the results in.
- Returns:
Object|String
- Either the results object or, if a test format is passed as the argument, a string representing the results in a specific format.
isRunning
Boolean
isRunning
(
)
Indicates that the TestRunner is busy running tests and therefore can't
be stopped and results cannot be gathered.
- Returns:
Boolean
- True if the TestRunner is running, false if not.
isWaiting
static
Boolean
isWaiting
(
)
Indicates if the TestRunner is waiting for a test to resume
- Returns:
Boolean
- True if the TestRunner is waiting, false if not.
resume
static
Void
resume
(
segment
)
Resumes the TestRunner after wait() was called.
- Parameters:
-
segment <Function>
The function to run as the rest of the haulted test.
run
static
Void
run
(
oldMode
)
Runs the test suite.
- Parameters:
-
oldMode <Boolean>
(Optional) Specifies that the <= 2.8 way of internally managing test suites should be used.
setName
Void
setName
(
name
)
The name assigned to the master suite of the TestRunner. This is the name
that is output as the root's name when results are retrieved.
- Parameters:
-
name <String>
The name of the result set.