.github/skills/run-integration-tests/SKILL.md
Run integration tests to verify that extension components work together correctly. Use this after modifying component interactions or event handling.
npx skillsauth add microsoft/vscode-python-environments run-integration-testsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run integration tests to verify that multiple components (managers, API, settings) work together correctly.
| Action | Command |
| ------------------------- | ---------------------------------------------------------------------- |
| Run all integration tests | npm run compile && npm run compile-tests && npm run integration-test |
| Run specific test | npm run integration-test -- --grep "manager" |
| Debug in VS Code | Debug panel → "Integration Tests" → F5 |
Integration tests run in a real VS Code instance but focus on component interactions:
They're faster than E2E (which test full workflows) but more thorough than smoke tests.
npm run compile && npm run compile-tests && npm run integration-test
Pass:
Integration: Environment Manager + API
✓ API reflects manager state after refresh
✓ Different scopes return appropriate environments
✓ Environment objects have consistent structure
3 passing (25s)
Fail: Check error message and see Debugging section.
| Error | Cause | Fix |
| ------------------- | --------------------------- | ------------------------------- |
| API not available | Extension activation failed | Check Debug Console |
| Event not fired | Event wiring issue | Check event registration |
| State mismatch | Components out of sync | Add logging, check update paths |
| Timeout | Async operation stuck | Check for deadlocks |
For detailed debugging: Debug panel → "Integration Tests" → F5
Create files in src/test/integration/ with pattern *.integration.test.ts:
import * as assert from 'assert';
import * as vscode from 'vscode';
import { waitForCondition, TestEventHandler } from '../testUtils';
import { ENVS_EXTENSION_ID } from '../constants';
suite('Integration: [Component A] + [Component B]', function () {
this.timeout(120_000);
let api: ExtensionApi;
suiteSetup(async function () {
const extension = vscode.extensions.getExtension(ENVS_EXTENSION_ID);
assert.ok(extension, 'Extension not found');
if (!extension.isActive) await extension.activate();
api = extension.exports;
});
test('[Interaction test]', async function () {
// Test component interaction
});
});
| File | Purpose |
| -------------------------------------------------------- | -------------------------------------------------- |
| src/test/integration/envManagerApi.integration.test.ts | Manager + API tests |
| src/test/integration/index.ts | Test runner entry point |
| src/test/testUtils.ts | Utilities (waitForCondition, TestEventHandler) |
npm run compile (webpack) before tests, not just npm run compile-tests (tsc)npm run compile before tests.vscode-test/)development
VS Code settings precedence rules and common pitfalls. Essential for any code that reads or writes settings. Covers getConfiguration scope, inspect() vs get(), and multi-workspace handling.
tools
Run smoke tests to verify extension functionality in a real VS Code environment. Use this when checking if basic features work after changes.
development
Run the mandatory pre-commit checks before committing code. Includes lint, type checking, and unit tests. MUST be run before every commit.
testing
Run E2E tests to verify complete user workflows like environment discovery, creation, and selection. Use this before releases or after major changes.