TestController class

Entry point to discover and execute tests. It contains {@link TestController.items} which are used to populate the editor UI, and is associated with {@link TestController.createRunProfilerun profiles} to allow for tests to be executed.

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

Constructors

TestController({String? id, String? label, TestItemCollection? items, FutureOr<void> resolveHandler([TestItem?])?, FutureOr<void> refreshHandler(CancellationToken)?, TestRunProfile createRunProfile(String, TestRunProfileKind, FutureOr<void> (TestRunRequest, CancellationToken), [bool?, TestTag?, bool?])?, TestRun createTestRun(TestRunRequest, [String?, bool?])?, TestItem createTestItem(String, String, [Uri?])?, void invalidateTestResults([Object?])?, void dispose()?})
factory

Properties

createRunProfile TestRunProfile Function(String, TestRunProfileKind, FutureOr<void> (TestRunRequest, CancellationToken), [bool?, TestTag?, bool?])

Available on TestController, provided by the TestController$Typings extension

getter/setter pair
createTestItem TestItem Function(String, String, [Uri?])

Available on TestController, provided by the TestController$Typings extension

getter/setter pair
createTestRun TestRun Function(TestRunRequest, [String?, bool?])

Available on TestController, provided by the TestController$Typings extension

getter/setter pair
dispose ↔ void Function()

Available on TestController, provided by the TestController$Typings extension

getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id String

Available on TestController, provided by the TestController$Typings extension

The id of the controller passed in {@link tests.createTestController}. This must be globally unique.
no setter
invalidateTestResults ↔ void Function([Object?])

Available on TestController, provided by the TestController$Typings extension

getter/setter pair
items TestItemCollection

Available on TestController, provided by the TestController$Typings extension

A collection of "top-level" {@link TestItem} instances, which can in turn have their own {@link TestItem.childrenchildren} to form the "test tree."
no setter
label String

Available on TestController, provided by the TestController$Typings extension

Human-readable label for the test controller.
getter/setter pair
refreshHandler FutureOr<void> Function(CancellationToken)?

Available on TestController, provided by the TestController$Typings extension

If this method is present, a refresh button will be present in the UI, and this method will be invoked when it's clicked. When called, the extension should scan the workspace for any new, changed, or removed tests.
getter/setter pair
resolveHandler FutureOr<void> Function([TestItem?])?

Available on TestController, provided by the TestController$Typings extension

A function provided by the extension that the editor may call to request children of a test item, if the {@link TestItem.canResolveChildren} is true. When called, the item should discover children and call {@link TestController.createTestItem} as children are discovered.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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