mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 19:18:59 +01:00
testing: initial api side of test coverage
For https://github.com/microsoft/vscode/issues/123713
This commit is contained in:
@@ -56,7 +56,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 } from 'vs/workbench/contrib/testing/common/testCollection';
|
||||
import { ExtensionRunTestsRequest, ISerializedTestResults, ITestItem, ITestMessage, ITestRunTask, RunTestForControllerRequest, RunTestsRequest, ITestIdWithSrc, TestsDiff, IFileCoverage, CoverageDetails } from 'vs/workbench/contrib/testing/common/testCollection';
|
||||
import { InternalTimelineOptions, Timeline, TimelineChangeEvent, TimelineOptions, TimelineProviderDescriptor } from 'vs/workbench/contrib/timeline/common/timeline';
|
||||
import { ActivationKind, ExtensionHostKind, MissingExtensionDependency } from 'vs/workbench/services/extensions/common/extensions';
|
||||
import { createExtHostContextProxyIdentifier as createExtId, createMainContextProxyIdentifier as createMainId, IRPCProtocol } from 'vs/workbench/services/extensions/common/proxyIdentifier';
|
||||
@@ -2064,14 +2064,19 @@ export const enum ExtHostTestingResource {
|
||||
export interface ExtHostTestingShape {
|
||||
$runControllerTests(req: RunTestForControllerRequest, token: CancellationToken): Promise<void>;
|
||||
$cancelExtensionTestRun(runId: string | undefined): void;
|
||||
|
||||
/** Handles a diff of tests, as a result of a subscribeToDiffs() call */
|
||||
$acceptDiff(diff: TestsDiff): void;
|
||||
|
||||
/** Publishes that a test run finished. */
|
||||
$publishTestResults(results: ISerializedTestResults[]): void;
|
||||
/** Expands a test item's children, by the given number of levels. */
|
||||
$expandTest(src: ITestIdWithSrc, levels: number): Promise<void>;
|
||||
/** Requests file coverage for a test run. Errors if not available. */
|
||||
$provideFileCoverage(runId: string, taskId: string, token: CancellationToken): Promise<IFileCoverage[]>;
|
||||
/**
|
||||
* Requests coverage details for the file index in coverage data for the run.
|
||||
* Requires file coverage to have been previously requested via $provideFileCoverage.
|
||||
*/
|
||||
$resolveFileCoverage(runId: string, taskId: string, fileIndex: number, token: CancellationToken): Promise<CoverageDetails[]>;
|
||||
}
|
||||
|
||||
export interface MainThreadTestingShape {
|
||||
@@ -2101,6 +2106,8 @@ export interface MainThreadTestingShape {
|
||||
$appendTestMessageInRun(runId: string, taskId: string, testId: string, message: ITestMessage): void;
|
||||
/** Appends raw output to the test run.. */
|
||||
$appendOutputToRun(runId: string, taskId: string, output: VSBuffer): void;
|
||||
/** Triggered when coverage is added to test results. */
|
||||
$signalCoverageAvailable(runId: string, taskId: string): void;
|
||||
/** Signals a task in a test run started. */
|
||||
$startedTestRunTask(runId: string, task: ITestRunTask): void;
|
||||
/** Signals a task in a test run ended. */
|
||||
|
||||
Reference in New Issue
Block a user