帮助开发者在 VS Code 仓库中运行并筛选集成测试,区分不同测试类型。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "integration-tests" 技能: 1. 下载 https://raw.githubusercontent.com/microsoft/vscode/main/.github/skills/integration-tests/SKILL.md 2. 保存为 ~/.claude/skills/integration-tests/SKILL.md 3. 装好后重载技能,告诉我可以用了
请说明在 VS Code 仓库里如何运行 integration tests,并只执行某个测试文件或测试名称,分别给出 macOS/Linux 和 Windows 的命令示例。
返回适用脚本、可用过滤参数,以及不同操作系统下的命令示例。
解释 VS Code 仓库中的 node.js integration tests 和 extension host tests 有什么区别,适合什么场景,以及运行时要注意什么。
给出两类测试的定位、运行环境差异、常见使用场景与注意事项。
我在运行 scripts/test-integration.sh 或 scripts/test-integration.bat 时想按目录、文件或测试名过滤,请整理这些脚本支持的参数,并说明常见错误用法。
输出参数清单、过滤方式说明,以及容易混淆的错误示例和修正建议。
Integration tests in VS Code are split into two categories:
.integrationTest.ts under src/. These run in Electron via the same Mocha runner as unit tests.extensions/ (API tests, Git tests, TypeScript tests, etc.). These launch a full VS Code instance with --extensionDevelopmentPath../scripts/test-integration.sh [options].\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.
--run <file> - Run tests from a specific fileAccepts 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 pathSelects 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 nameFilters 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 suitesRuns 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
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.
# 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
…
帮助开发者定位并读取 Code OSS 开发构建日志,快速排查运行与扩展问题。
帮助开发者新增、修改或审查 VS Code 配置策略,并生成平台相关产物。
帮助开发者验证 Azure DevOps 流水线改动,快速排查构建与 YAML 配置问题。
在隔离环境启动 VS Code OSS,便于联动自动化操作与多进程调试。
运行聊天性能基准与内存泄漏检查,定位聊天界面回归和性能问题。
帮助开发者创建和维护组件截图测试夹具,并优化组件的可测试性。
帮助开发者在 VS Code 仓库中运行、筛选并调试单元测试。
帮助用户在本地启动 vscode.dev 并测试 VS Code 工作台与 Agents 窗口。
自动启动并操控 VS Code Insiders 与 Copilot Chat,完成界面测试、聊天交互和截图。
自动驱动 VS Code 性能与内存排查,生成可复现分析结果与对比证据。
根据本地集成测试失败信息,自动整理并创建 GitHub 缺陷问题。
帮助开发者调查 GitHub 集成测试失败原因并给出修复建议