TestRunProfile

A TestRunProfile describes one way to execute tests in a TestController.

Online Documentation

Properties

Link copied to clipboard
abstract var configureHandler: () -> Unit?

If this method is present, a configuration gear will be present in the UI, and this method will be invoked when it's clicked. When called, you can take other editor actions, such as showing a quick pick or opening a configuration file.

Link copied to clipboard
abstract var isDefault: Boolean

Controls whether this profile is the default action that will be taken when its kind is actioned. For example, if the user clicks the generic "run all" button, then the default profile for TestRunProfileKind.Run will be executed, although the user can configure this.

Link copied to clipboard
abstract val kind: TestRunProfileKind

Configures what kind of execution this profile controls. If there are no profiles for a kind, it will not be available in the UI.

Link copied to clipboard
abstract var label: String

Label shown to the user in the UI.

Link copied to clipboard

An extension-provided function that provides detailed statement and function-level coverage for a file. The editor will call this when more detail is needed for a file, such as when it's opened in an editor or expanded in the Test Coverage view.

Link copied to clipboard
abstract var loadDetailedCoverageForTest: (testRun: TestRun, fileCoverage: FileCoverage, fromTestItem: TestItem, token: CancellationToken) -> PromiseLike<ReadonlyArray<FileCoverageDetail>>?

An extension-provided function that provides detailed statement and function-level coverage for a single test in a file. This is the per-test sibling of TestRunProfile.loadDetailedCoverage, called only if a test item is provided in FileCoverage.includesTests and only for files where such data is reported.

Link copied to clipboard

Fired when a user has changed whether this is a default profile. The event contains the new value of isDefault

Link copied to clipboard
abstract var runHandler: (request: TestRunRequest, token: CancellationToken) -> PromiseLike<Void?>?

Handler called to start a test run. When invoked, the function should call TestController.createTestRun at least once, and all test runs associated with the request should be created before the function returns or the returned promise is resolved.

Link copied to clipboard

Whether this profile supports continuous running of requests. If so, then TestRunRequest.continuous may be set to true. Defaults to false.

Link copied to clipboard
abstract var tag: TestTag?

Associated tag for the profile. If this is set, only TestItem instances with the same tag will be eligible to execute in this profile.

Functions

Link copied to clipboard
abstract override fun dispose()

Deletes the run profile.