testing: add test configurations api

This commit is contained in:
Connor Peet
2021-06-28 18:58:46 -07:00
parent 4cf81a2a56
commit 9a09d4817d
31 changed files with 943 additions and 533 deletions

View File

@@ -57,7 +57,7 @@ import { ICellRange } from 'vs/workbench/contrib/notebook/common/notebookRange';
import { InputValidationType } from 'vs/workbench/contrib/scm/common/scm';
import { ITextQueryBuilderOptions } from 'vs/workbench/contrib/search/common/queryBuilder';
import { ISerializableEnvironmentVariableCollection } from 'vs/workbench/contrib/terminal/common/environmentVariable';
import { ExtensionRunTestsRequest, ISerializedTestResults, ITestItem, ITestMessage, ITestRunTask, RunTestForControllerRequest, RunTestsRequest, ITestIdWithSrc, TestsDiff, IFileCoverage, CoverageDetails } from 'vs/workbench/contrib/testing/common/testCollection';
import { ExtensionRunTestsRequest, ISerializedTestResults, ITestItem, ITestMessage, ITestRunTask, RunTestForControllerRequest, ResolvedTestRunRequest, ITestIdWithSrc, TestsDiff, IFileCoverage, CoverageDetails, ITestRunConfiguration } from 'vs/workbench/contrib/testing/common/testCollection';
import { InternalTimelineOptions, Timeline, TimelineChangeEvent, TimelineOptions, TimelineProviderDescriptor } from 'vs/workbench/contrib/timeline/common/timeline';
import { EditorGroupColumn } from 'vs/workbench/services/editor/common/editorGroupColumn';
import { ActivationKind, ExtensionHostKind, MissingExtensionDependency } from 'vs/workbench/services/extensions/common/extensions';
@@ -2090,6 +2090,8 @@ export interface ExtHostTestingShape {
}
export interface MainThreadTestingShape {
// --- test lifecycle:
/** Registeres that there's a test controller with the given ID */
$registerTestController(controllerId: string): void;
/** Diposes of the test controller with the given ID */
@@ -2100,11 +2102,21 @@ export interface MainThreadTestingShape {
$unsubscribeFromDiffs(): void;
/** Publishes that new tests were available on the given source. */
$publishDiff(controllerId: string, diff: TestsDiff): void;
/** Request by an extension to run tests. */
$runTests(req: RunTestsRequest, token: CancellationToken): Promise<string>;
// --- test run configurations:
/** Called when a new test run configuration is available */
$publishTestRunConfig(config: ITestRunConfiguration): void;
/** Updates an existing test run configuration */
$updateTestRunConfig(controllerId: string, configId: number, update: Partial<ITestRunConfiguration>): void;
/** Removes a previously-published test run config */
$removeTestRunConfig(controllerId: string, configId: number): void;
// --- test run handling:
/** Request by an extension to run tests. */
$runTests(req: ResolvedTestRunRequest, token: CancellationToken): Promise<string>;
/**
* Adds tests to the run. The tests are given in descending depth. The first
* item will be a previously-known test, or a test root.