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.
Fields
optionalrange:Null<Range>
Location of the test item in its {@link uri}.
This is only meaningful if the uri
points to a file.
optionalread onlyparent:Null<TestItem>
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 children}.
read onlyid:String
optionalerror:Null<EitherType<String, MarkdownString>>
Optional error encountered while loading the test.
Note that this is not a test result and should only be used to represent errors in test discovery, such as syntax errors.
read onlychildren:TestItemCollection
The children of this test item. For a test suite, this may contain the individual test cases or nested suites.
canResolveChildren:Bool
Indicates whether this test item may have children discovered by resolving.
If true, this item is shown as expandable in the Test Explorer view and expanding the item will cause {@link TestController.resolveHandler} to be invoked with the item.
Default to false
.
busy:Bool
Controls whether the item is shown as "busy" in the Test Explorer view. This is useful for showing status while discovering children.
Defaults to false
.