-
<static> closeTest()
-
function will close out the currently running test objects, but any async
tasks will continue running.
- Source:
-
<static> currentSuite()
-
function will get the current suite in use. this is primarily used for
associating a suite with a test
- Source:
-
<static> currentTest()
-
function will get the currently executing test
- Source:
-
<static> onAssertionFailure(details)
-
function hook that is called when an assertion fails
Parameters:
Name |
Type |
Description |
details |
Object
|
an object containing a 'test' property for the
currently started test object and a 'message' property for the failure
message |
- Source:
-
<static> onError()
-
function hook that is called when there is a test error
- Source:
-
<static> onExit()
-
function hook that is called when program exits
- Source:
-
<static> onPageError()
-
function hook that is called when the underlying page
experiences an error
- Source:
-
<static> onTestCompleted(details)
-
function hook that is called when a test completes. this
includes anything resulting in PFT.tester.done
being called
Parameters:
Name |
Type |
Description |
details |
Object
|
an object containing a 'test' property for the
currently started test object |
- Source:
-
<static> onTestStarted(details)
-
function hook that is called when a new test is started
Parameters:
Name |
Type |
Description |
details |
Object
|
an object containing a 'test' property for the
currently started test object |
- Source:
-
<static> onTimeout()
-
function hook that is called when a test times out
- Source:
-
<static> run(name, callback, timeout)
-
Parameters:
Name |
Type |
Argument |
Default |
Description |
name |
string
|
|
|
the name of the test |
callback |
testCallback
|
|
|
the function to execute as a test. when
executed this function will be passed two arguments, a PhantomJs.Webpage.Page,
and a PFT.tester.assert object referencing the test |
timeout |
Number
|
<optional>
|
PFT.DEFAULT_TIMEOUT
|
the maximum time in
milliseconds to allow the test to execute before it is marked as a fail.
this time includes any setup and teardown that is specified |
- Source: