Options given to {@link TestController.runTests}

Fields

read onlytoken:CancellationToken

A cancellation token which will be triggered when the test run is canceled from the UI.

started(test:TestItem):Void

Indicates a test has started running.

Parameters:

test

Test item to update.

skipped(test:TestItem):Void

Indicates a test has been skipped.

Parameters:

test

Test item to update.

passed(test:TestItem, ?duration:Float):Void

Indicates a test has passed.

Parameters:

test

Test item to update.

duration

How long the test took to execute, in milliseconds.

@:optionaloptionalread onlyname:Null<String>

The human-readable name of the run. This can be used to disambiguate multiple sets of results in a test run. It is useful if tests are run across multiple platforms, for example.

read onlyisPersisted:Bool

Whether the test run will be persisted across reloads by the editor.

failed(test:TestItem, message:EitherType<TestMessage, ReadOnlyArray<TestMessage>>, ?duration:Float):Void

Indicates a test has failed. You should pass one or more {@link TestMessage TestMessages} to describe the failure.

Parameters:

test

Test item to update.

messages

Messages associated with the test failure.

duration

How long the test took to execute, in milliseconds.

errored(test:TestItem, message:EitherType<TestMessage, ReadOnlyArray<TestMessage>>, ?duration:Float):Void

Indicates a test has errored. You should pass one or more {@link TestMessage TestMessages} to describe the failure. This differs from the "failed" state in that it indicates a test that couldn't be executed at all, from a compilation error for example.

Parameters:

test

Test item to update.

messages

Messages associated with the test failure.

duration

How long the test took to execute, in milliseconds.

enqueued(test:TestItem):Void

Indicates a test is queued for later execution.

Parameters:

test

Test item to update.

end():Void

Signals that the end of the test run. Any tests included in the run whose states have not been updated will have their state reset.

appendOutput(output:String):Void

Appends raw output from the test runner. On the user's request, the output will be displayed in a terminal. ANSI escape sequences, such as colors and text styles, are supported.

Parameters:

output

Output text to append.