Skip to content

Installation

ExTester (published on npm as vscode-extension-tester) is a package designed to help you run UI tests for your VS Code extensions using Selenium WebDriver.

Install it into your extension’s devDependencies to get started:

Terminal window
npm install --save-dev vscode-extension-tester

The package brings everything you need:

  • The extest CLI that automates the whole test setup:
    • Downloads a test instance of VS Code
    • Downloads the matching version of ChromeDriver
    • Packages and installs your extension into the VS Code instance
    • Launches the VS Code instance using WebDriver
    • Runs your tests
  • The Page Object APIs for interacting with VS Code UI components without touching its DOM.

Before you start, check the supported VS Code and Node.js versions.

For a streamlined testing workflow, we recommend installing the ExTester Runner VS Code extension. It provides an enhanced UI for test orchestration and improves the overall developer experience. Learn more in the ExTester Runner guide.

A complete working example of an extension tested with ExTester is available in the vscode-extension-tester-example repository.