Skip to content

dave-bartolomeo/vscode-test-adapter-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VS Code Test Adapter API

This package contains the APIs that Test Adapters or Test Controllers need to implement to work with the VS Code Test Explorer.

The API documentation can be found here

New API in version 1.0

Version 1.0 of this package contains a new Test Adapter API, which is very similar to the pre-1.0 API but requires some changes to Test Adapters. The old API is still supported but it is deprecated, so Test Adapters should move to the new API. You can still access the old API with an import like this:

import { TestAdapter } from 'vscode-test-adapter-api/out/legacy';

To move to the new API, the following changes are necessary:

  • the Test Adapter must offer a new event source tests that is used to send events when it starts and finishes loading the test definitions:
tests: vscode.Event<TestLoadStartedEvent | TestLoadFinishedEvent>;
  • when it detects any changes to the test files or its configuration that make it necessary to reload the test definitions, it should start doing so immediately (instead of sending a reload event and then waiting for a call to load()); the reload event source has been removed
  • the loaded test definitions are now sent using the TestLoadFinishedEvent, not as the return value of the load() method
  • the run() and debug() methods now receive an array of test or suite IDs
  • it must send a TestRunStartedEvent and a TestRunFinishedEvent at the beginning and end of a test run, repectively.

About

Test Adapter API for the VS Code Test Explorer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%