
Integration Tests
OfficialFreeRun integration tests for the VS Code repository efficiently.
Free · Opens the source repo
What Integration Tests does
The Integration Tests skill is designed for developers working with the Visual Studio Code (VS Code) repository, providing a streamlined way to execute integration tests. It supports two types of integration tests: Node.js integration tests and extension host tests. Node.js tests are located in the src/ directory and utilize the Mocha testing framework, while extension host tests are embedded within built-in extensions and require launching a full instance of VS Code. This skill allows users to run these tests with various filtering options to suit their testing needs.
To execute integration tests, users can utilize the provided scripts: ./scripts/test-integration.sh for macOS/Linux and . ests est-integration.bat for Windows. By default, these scripts run all available tests. However, users can apply filters using options like --run, --runGlob, and --grep to focus on specific test files or cases. This flexibility is particularly beneficial for developers who need to isolate tests based on their current work or debugging efforts.
The skill also distinguishes between Node.js integration tests and extension host tests, allowing users to run them selectively. For instance, using the --suite option, users can execute specific extension host test suites, which is useful for testing particular functionalities within the VS Code environment. Additionally, the skill ensures that tests are run against compiled JavaScript output, emphasizing the importance of having the VS Code build task running prior to executing tests.
This skill is ideal for developers contributing to the VS Code project or those looking to ensure the stability of their extensions through integration testing. It streamlines the testing process, making it easier to manage and execute tests effectively without confusion between different test types.
When to use it
Use this skill when you need to run integration tests in the VS Code repository, especially when working on new features or bug fixes that require validation through testing.
When not to use it
This skill is not suitable for running unit tests, as it is specifically designed for integration tests and does not support `.test.ts` files.
What you can build with it
Running All Integration Tests
Execute all integration tests in the VS Code repository to ensure overall stability.
Filtering Tests by Name
Use the `--grep` option to run specific tests that match a given name or pattern.
Testing Specific Extensions
Run only the integration tests for a specific extension using the `--suite` option.
How to install Integration Tests
View source1. Install with the skills CLI
npx skills add microsoft/vscode/integration-tests --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by microsoftRunning Integration Tests
Integration tests in VS Code are split into two categories:
- Node.js integration tests - files ending in
.integrationTest.tsundersrc/. These run in Electron via the same Mocha runner as unit tests. - Extension host tests - tests embedded in built-in extensions under
extensions/(API tests, Git tests, TypeScript tests, etc.). These launch a full VS Code instance with--extensionDevelopmentPath.
Scripts
- macOS / Linux:
./scripts/test-integration.sh [options] - Windows:
.\scripts\test-integration.bat [options]
When run without filters, both scripts execute all node.js integration tests followed by all extension host tests. The deterministic Agent Host E2E entrypoints are parallelized across isolated test processes during the node.js phase, then excluded from the remaining serial node.js run.
When run with --run or --runGlob (without --suite), only the node.js integration tests are run and the filter is applied. Extension host tests are skipped since these filters are node.js-specific.
When run with --grep alone (no --run, --runGlob, or --suite), all tests are run -- both node.js integration tests and all extension host suites -- with the grep pattern forwarded to every test runner.
When run with --suite, only the matching extension host test suites are run. Node.js integration tests are skipped. Combine --suite with --grep to filter individual tests within the selected suites.
Options
--run <file> - Run tests from a specific file
Accepts a source file path (starting with src/). Works identically to scripts/test.sh --run.
./scripts/test-integration.sh --run src/vs/workbench/services/search/test/browser/search.integrationTest.ts
--runGlob <pattern> (aliases: --glob, --runGrep) - Select test files by path
Selects which test files to load by matching compiled .js file paths against a glob pattern. Overrides the default **/*.integrationTest.js glob. Only applies to node.js integration tests (extension host tests are skipped).
./scripts/test-integration.sh --runGlob "**/search/**/*.integrationTest.js"
--grep <pattern> (aliases: -g, -f) - Filter test cases by name
Filters which test cases run by matching against their test titles (e.g. describe/test names). When used alone, the grep is applied to both node.js integration tests and all extension host suites. When combined with --suite, only the matched suites run with the grep.
./scripts/test-integration.sh --grep "TextSearchProvider"
--suite <pattern> - Run specific extension host test suites
Runs only the extension host test suites whose name matches the pattern. Supports comma-separated values and shell glob patterns (on macOS/Linux). Node.js integration tests are skipped.
Available suite names: api-folder, api-workspace, colorize, terminal-suggest, typescript, markdown, emmet, git, git-base, ipynb, notebook-renderers, configuration-editing, github-authentication, css, html.
# Run only Git extension tests
./scripts/test-integration.sh --suite git
# Run API folder and workspace tests (glob, macOS/Linux only)
./scripts/test-integration.sh --suite 'api*'
# Run multiple specific suites
./scripts/test-integration.sh --suite 'git,emmet,typescript'
# Filter tests within a suite by name
./scripts/test-integration.sh --suite api-folder --grep 'should open'
--help, -h - Show help
./scripts/test-integration.sh --help
Other options
All other options (e.g. --timeout, --coverage, --reporter) are forwarded to the underlying scripts/test.sh runner for node.js integration tests. These extra options are not forwarded to extension host suites when using --suite.
Examples
# Run all integration tests (node.js + extension host)
./scripts/test-integration.sh
# Run a single integration test file
./scripts/test-integration.sh --run src/vs/workbench/services/search/test/browser/search.integrationTest.ts
# Run integration tests matching a grep pattern
./scripts/test-integration.sh --grep "TextSearchProvider"
# Run integration tests under a specific area
./scripts/test-integration.sh --runGlob "**/workbench/**/*.integrationTest.js"
# Run only Git extension host tests
./scripts/test-integration.sh --suite git
# Run API folder + workspace extension tests (glob)
./scripts/test-integration.sh --suite 'api*'
# Run multiple extension test suites
./scripts/test-integration.sh --suite 'git,typescript,emmet'
# Grep for specific tests in the API folder suite
./scripts/test-integration.sh --suite api-folder --grep 'should open'
# Combine file and grep
./scripts/test-integration.sh --run src/vs/workbench/services/search/test/browser/search.integrationTest.ts --grep "should search"
Compilation requirement
Tests run against compiled JavaScript output. Ensure the VS Code - Build watch task is running or that compilation has completed before running tests.
Distinction from unit tests
- Unit tests (
.test.ts) → usescripts/test.shor therunTeststool - Integration tests (
.integrationTest.tsand extension tests) → usescripts/test-integration.sh
Do not mix these up: scripts/test.sh will not find integration test files unless you explicitly pass --runGlob **/*.integrationTest.js, and scripts/test-integration.sh is not intended for .test.ts files.
Frequently asked questions about Integration Tests
Similar skills
Spring Boot Testing
Master testing techniques for Spring Boot 4 applications.
GitHub Issues
Manage GitHub issues efficiently with MCP tools.
Geofeed Tuner
Optimize your IP geolocation feeds in CSV format.
Batch Files
Master Windows batch scripting for automation and task management.
Adobe Illustrator Scripting
Automate your Illustrator workflows with ExtendScript.
Plugin Structure
Create and organize Claude Code plugins effectively.
