Agent SkillsasJEI/vscode › integration-tests

integration-tests

GitHub

用于在 VS Code 仓库中运行集成测试。涵盖 macOS/Linux 和 Windows 的脚本、参数过滤逻辑,以及 Node.js 集成测试与扩展主机测试的区别。

.github/skills/integration-tests/SKILL.md asJEI/vscode

触发场景

需要运行 VS Code 集成测试 询问 test-integration.sh 或 .bat 用法 查询 --run、--grep、--suite 等参数含义

安装

npx skills add asJEI/vscode --skill integration-tests -g -y
更多选项

非标准路径

npx skills add https://github.com/asJEI/vscode/tree/main/.github/skills/integration-tests -g -y

不安装直接使用

npx skills use asJEI/vscode@integration-tests

指定 Agent (Claude Code)

npx skills add asJEI/vscode --skill integration-tests -a claude-code -g -y

安装 repo 全部 skill

npx skills add asJEI/vscode --all -g -y

预览 repo 内 skill

npx skills add asJEI/vscode --list

SKILL.md

Frontmatter
{
    "name": "integration-tests",
    "description": "Use when running integration tests in the VS Code repo. Covers scripts\/test-integration.sh (macOS\/Linux) and scripts\/test-integration.bat (Windows), their supported arguments for filtering, and the difference between node.js integration tests and extension host tests."
}

Running Integration Tests

Integration tests in VS Code are split into two categories:

  1. Node.js integration tests - files ending in .integrationTest.ts under src/. These run in Electron via the same Mocha runner as unit tests.
  2. 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.

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) → use scripts/test.sh or the runTests tool
  • Integration tests (.integrationTest.ts and extension tests) → use scripts/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.

版本历史

  • ce4db66 当前 2026-07-19 08:57

同 Skill 集合

.agents/skills/launch/SKILL.md
.github/skills/accessibility/SKILL.md
.github/skills/add-policy/SKILL.md
.github/skills/agent-host-e2e-tests/SKILL.md
.github/skills/agent-host-logs/SKILL.md
.github/skills/author-contributions/SKILL.md
.github/skills/auto-perf-optimize/SKILL.md
.github/skills/azure-pipelines/SKILL.md
.github/skills/chat-customizations-editor/SKILL.md
.github/skills/chat-perf/SKILL.md
.github/skills/code-oss-logs/SKILL.md
.github/skills/component-fixtures/SKILL.md
.github/skills/cpu-profile-analysis/SKILL.md
.github/skills/design-philosophy/SKILL.md
.github/skills/fix-ci-failures/SKILL.md
.github/skills/fix-errors/SKILL.md
.github/skills/heap-snapshot-analysis/SKILL.md
.github/skills/hygiene/SKILL.md
.github/skills/integrated-browser/SKILL.md
.github/skills/memory-leak-audit/SKILL.md
.github/skills/otel/SKILL.md
.github/skills/sessions/SKILL.md
.github/skills/smoke-tests/SKILL.md
.github/skills/symbolicate-crash-dump/SKILL.md
.github/skills/tool-rename-deprecation/SKILL.md
.github/skills/unit-tests/SKILL.md
.github/skills/update-screenshots/SKILL.md
.github/skills/ux-css-layout/SKILL.md
.github/skills/ux-theming/SKILL.md
.github/skills/vscode-dev-workbench/SKILL.md
extensions/copilot/.agents/skills/anthropic-sdk-upgrader/SKILL.md
extensions/copilot/.agents/skills/launch/SKILL.md
src/vs/sessions/skills/act-on-feedback/SKILL.md
src/vs/sessions/skills/code-review/SKILL.md
src/vs/sessions/skills/commit/SKILL.md
src/vs/sessions/skills/create-draft-pr/SKILL.md
src/vs/sessions/skills/create-pr/SKILL.md
src/vs/sessions/skills/fix-ci/SKILL.md
src/vs/sessions/skills/generate-run-commands/SKILL.md
src/vs/sessions/skills/merge/SKILL.md
src/vs/sessions/skills/sync-upstream/SKILL.md
src/vs/sessions/skills/sync/SKILL.md
src/vs/sessions/skills/troubleshoot/SKILL.md
src/vs/sessions/skills/update-pr/SKILL.md
src/vs/sessions/skills/update-skills/SKILL.md
extensions/copilot/.agents/skills/github-copilot-upgrader/SKILL.md

元信息

文件数
0
版本
ce4db66
Hash
69a75409
收录时间
2026-07-19 08:57

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-23 05:44
浙ICP备14020137号-1 $访客地图$