Define a unit test and it's configuration... |
Test(testName, testMode, unitTest[, testData]); |
Parameter | Type | Mandatory | Notes | API Version |
---|---|---|---|---|
testName | String | The name of the test – keep it concise but descriptive. | 1.0 | |
testMode | Test Mode | The mode in which the test is run – see Test Modes for more details. | 1.0 | |
unitTest | Unit Tests | A function that performs one or more Test Assertions and optionally Test Signals. | 1.0 | |
testData | Variant | Optionally pass in any data that will be exposed as the testData parameter in the unitTest function when it runs. | 1.0 |
Don't read too much in to these. Most test modes result in the test being queued in which case you'll almost always get a return value of Test.PENDING.
Constant | Value | Type | Notes | API Version |
---|---|---|---|---|
Test.SUCCESS | true | Boolean | Indicates the test was completed and passed. | 1.0 |
Test.FAILED | false | Boolean | Indicates the test was completed but failed. | 1.0 |
Test.RUNNING | null | Null | Indicates a Test.ASYNCH( ) test is waiting for additional results from subsequent Test.APPEND( ) tests. | 1.0 |
Test.PENDING | undefined | Undefined | Indicates the test has not yet started. | 1.0 |
<error> | Error | Indicates that during a routine systems check, the NASDA system that was designed to protect us turned out to be our ultimate executioner. | 1.0 |