TestRun class

A TestRun represents an in-progress or completed test run and provides methods to report the state of individual tests in the run.

Available extensions
Annotations
  • @JS()
  • @staticInterop
  • @anonymous

Constructors

TestRun({String? name, CancellationToken? token, bool? isPersisted, void enqueued(TestItem)?, void started(TestItem)?, void skipped(TestItem)?, void failed(TestItem, Object, [num?])?, void errored(TestItem, Object, [num?])?, void passed(TestItem, [num?])?, void appendOutput(String, [Location?, TestItem?])?, void end()?})
factory

Properties

appendOutput ↔ void Function(String, [Location?, TestItem?])

Available on TestRun, provided by the TestRun$Typings extension

getter/setter pair
end ↔ void Function()

Available on TestRun, provided by the TestRun$Typings extension

getter/setter pair
enqueued ↔ void Function(TestItem)

Available on TestRun, provided by the TestRun$Typings extension

getter/setter pair
errored ↔ void Function(TestItem, Object, [num?])

Available on TestRun, provided by the TestRun$Typings extension

getter/setter pair
failed ↔ void Function(TestItem, Object, [num?])

Available on TestRun, provided by the TestRun$Typings extension

getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isPersisted bool

Available on TestRun, provided by the TestRun$Typings extension

Whether the test run will be persisted across reloads by the editor.
no setter
name String?

Available on TestRun, provided by the TestRun$Typings extension

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.
no setter
passed ↔ void Function(TestItem, [num?])

Available on TestRun, provided by the TestRun$Typings extension

getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
skipped ↔ void Function(TestItem)

Available on TestRun, provided by the TestRun$Typings extension

getter/setter pair
started ↔ void Function(TestItem)

Available on TestRun, provided by the TestRun$Typings extension

getter/setter pair
token CancellationToken

Available on TestRun, provided by the TestRun$Typings extension

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

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited