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:
npm install --save-dev vscode-extension-testerThe package brings everything you need:
- The
extestCLI 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.
Next steps
Section titled “Next steps”- Write your first UI test
- Set up and configure test runs — CLI usage, environment variables and
extester.config.json - Configure the Mocha test runner
ExTester Runner extension
Section titled “ExTester Runner extension”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.
Example project
Section titled “Example project”A complete working example of an extension tested with ExTester is available in the vscode-extension-tester-example repository.
