Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

Defines the mode in which a unit test is run...

 

Test.ANY( )

Indicates that a test may create zero or more results, and the number of results does not affect the overall test success.

This is the default for tests that do not specify a testMode.

Test.EXPECT( numResults )

Indicate that the current test is expected to generate numResults test results. If the test does not generate that many results, the test will fail even if none of the collected results failed.

Test.STARTASYNCH( [gameSeconds[, numResults]] )

Indicates the current test is asynchronous and will be appended by subsequent Test.APPEND( ) tests.

Both parameters are optional (specify null to use default):

  • gameSeconds – how long to allow additional results to be gathered for (default: 60 game seconds)
  • numResults – the number of results required to pass the test (default: test doesn't require specific number of results)

Results can be provided by the current Test.STARTASYNCH( ) and subsequent Test.APPEND( ) tests. No new

Only one Test.ASYNCH( ) can run at a time.

Queued Test.ANY( ) or Test.EXPECT( ) tests will start not be triggered until the current asynchronous test current asynchronous test phase is complete (failed, passed, timed-out or abortedtimeout, fail or pass).

Test.APPEND( testName )

Indicates the test is a continuation of a specific Test.STARTASYNCH( ) test called testName and it's results will be appended to that test.

If the test called testName is not currently active (not started, timed-out, aborted, failed or passed), the Test.APPEND( ) will be skipped.