TestItem class

An item shown in the "test explorer" view.

A TestItem can represent either a test suite or a test itself, since they both have similar capabilities.

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

Constructors

TestItem({String? id, Uri? uri, TestItemCollection? children, TestItem? parent, List<TestTag>? tags, bool? canResolveChildren, bool? busy, String? label, String? description, String? sortText, Range? range, dynamic error})
factory

Properties

busy bool

Available on TestItem, provided by the TestItem$Typings extension

Controls whether the item is shown as "busy" in the Test Explorer view. This is useful for showing status while discovering children.
getter/setter pair
canResolveChildren bool

Available on TestItem, provided by the TestItem$Typings extension

Indicates whether this test item may have children discovered by resolving.
getter/setter pair
children TestItemCollection

Available on TestItem, provided by the TestItem$Typings extension

The children of this test item. For a test suite, this may contain the individual test cases or nested suites.
no setter
description String?

Available on TestItem, provided by the TestItem$Typings extension

Optional description that appears next to the label.
getter/setter pair
error ↔ dynamic

Available on TestItem, provided by the TestItem$Typings extension

Optional error encountered while loading the test.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id String

Available on TestItem, provided by the TestItem$Typings extension

Identifier for the TestItem. This is used to correlate test results and tests in the document with those in the workspace (test explorer). This cannot change for the lifetime of the TestItem, and must be unique among its parent's direct children.
no setter
label String

Available on TestItem, provided by the TestItem$Typings extension

Display name describing the test case.
getter/setter pair
parent TestItem?

Available on TestItem, provided by the TestItem$Typings extension

The parent of this item. It's set automatically, and is undefined top-level items in the {@link TestController.items} and for items that aren't yet included in another item's {@link TestItem.childrenchildren}.
no setter
range Range?

Available on TestItem, provided by the TestItem$Typings extension

Location of the test item in its {@link TestItem.uri uri}.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sortText String?

Available on TestItem, provided by the TestItem$Typings extension

A string that should be used when comparing this item with other items. When falsy the {@link TestItem.label label} is used.
getter/setter pair
tags List<TestTag>

Available on TestItem, provided by the TestItem$Typings extension

Tags associated with this test item. May be used in combination with {@link TestRunProfile.tag tags}, or simply as an organizational feature.
getter/setter pair
uri Uri?

Available on TestItem, provided by the TestItem$Typings extension

URI this TestItem is associated with. May be a file or directory.
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