The goog.testing.ContinuationTestCase.Test Class

goog.testing.ContinuationTestCase.Test
> goog.testing.TestCase.Test

goog.testing.ContinuationTestCase.Test(setUp, test, tearDown)

Creates a continuation test case, which consists of multiple test steps that occur in several phases. The steps are distributed between setUp, test, and tearDown phases. During the execution of each step, 0 or more steps may be added to the current phase. Once all steps in a phase have completed, the next phase will be executed. If any errors occur (such as an assertion failure), the setUp and Test phases will be cancelled immediately. The tearDown phase will always start, but may be cancelled as well if it raises an error.

setUp {goog.testing.TestCase.Test}
A setUp test method to run before the main test phase.
test {goog.testing.TestCase.Test}
A test method to run.
tearDown {goog.testing.TestCase.Test}
A tearDown test method to run after the test method completes or fails.

.addStep(step)

Adds a new test step to the end of the current phase. The new step will wait for a condition to be met before running, or will fail after a timeout.

step {goog.testing.ContinuationTestCase.Step}
The test step to add.

.cancelCurrentPhase()

Cancels all remaining steps in the current phase. Called after an error in any phase occurs.

.cancelTestPhase()

Skips the rest of the setUp and test phases, but leaves the tearDown phase to clean up.

.execute()

Inherited from goog.testing.TestCase.Test .

Executes the test function.

.getCurrentPhase()

returns {Array.<goog.testing.TestCase.Test>}
The current phase of steps being processed. Returns null if all steps have been completed.

.getError()

returns {Error}
The first error to be raised during the test run or null if no errors occurred.

.setError(e)

Sets an error for the test so it can be reported. Only the first error set during a test will be reported. Additional errors that occur in later test phases will be discarded.

e {Error}
An error.