TestController
Entry point to discover and execute tests. It contains TestController.items which are used to populate the editor UI, and is associated with run profiles to allow for tests to be executed.
Properties
The id of the controller passed in tests.createTestController. This must be globally unique.
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.
A function provided by the extension that the editor may call to request children of a test item, if the TestItem.canResolveChildren is true
. When called, the item should discover children and call TestController.createTestItem as children are discovered.
Functions
Creates a profile used for running tests. Extensions must create at least one profile in order for tests to be run.
Creates a new managed TestItem instance. It can be added into the TestItem.children of an existing item, or into the TestController.items.
Creates a TestRun. This should be called by the TestRunProfile when a request is made to execute tests, and may also be called if a test run is detected externally. Once created, tests that are included in the request will be moved into the queued state.
Marks an item's results as being outdated. This is commonly called when code or configuration changes and previous results should no longer be considered relevant. The same logic used to mark results as outdated may be used to drive continuous test runs.