Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>Python DeltaTestNew to Visual Studio Code? Get it now.
Python DeltaTest

Python DeltaTest

deltatest

|
1 install
| (1) | Free
Intelligent test selection for Python. Run only the tests affected by your code changes — with inline coverage glow, auto-refresh, and a built-in test report panel.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Python DeltaTest — Intelligent Test Selection for VS Code

Stop running your full test suite. Run only the tests that matter.

Delta is a developer-first intelligent test runner that maps every line of your source code to the exact tests that cover it. When you change code, Delta instantly knows which tests to run — and which ones to skip.

This VS Code extension brings Delta's power directly into your editor with inline coverage visualization, live test highlighting, and a built-in test report panel.


Features

🔦 Inline Coverage Glow

Every line covered by at least one test gets a soft, color-coded glow directly in your editor. Hover over any line to see exactly which tests cover it.

Line 42 │ def authenticate(username, password):    ← covered by 3 tests
Line 43 │     if validate_user(username):           ← covered by 3 tests
Line 44 │         return check_password(password)   ← covered by 3 tests
Line 45 │                                           ← not covered
Line 46 │ def logout(user):                         ← covered by 1 test

Hover tooltip example:

⚡ Delta Coverage — 3 tests
• test_login_success     tests/test_auth.py
• test_login_timeout     tests/test_auth.py
• test_end_to_end        tests/integration/test_full_flow.py

⚡ Auto-Refresh on Test Run

The extension watches your .delta/test_mapping.db for changes. After running delta run in your terminal, coverage highlights update automatically — no manual refresh needed.

📊 Test Report Panel

View your last test run results directly inside VS Code without switching to the terminal.

🔀 Branch-Aware Coverage

Coverage databases are tracked per git branch. Switching branches automatically switches your coverage context — no stale highlights from a different branch.


Requirements

  • A Python project using Delta (pip install deltatest-cli)
  • Python 3.8 or higher
  • A test mapping database (generated by delta build-mapping)

Getting Started

1. Install the Delta CLI

pip install deltatest-cli

2. Build Your Local Mapping Database

Run your tests once to build the coverage mapping database:

delta build-mapping --local

This creates .delta/test_mapping_<branch>.db in your project root. Add .delta/ to your .gitignore.

3. Install this Extension

Open any Python file in VS Code — highlights appear automatically.

4. Run Only Affected Tests

After making code changes, run only the tests that touch your changed lines:

delta run
# or with pytest directly:
pytest --delta

Cloud Mode (Team Sync)

With Delta Cloud, your test mappings are shared across your entire team and CI/CD pipeline. No one needs to run build-mapping locally — mappings are synced automatically on every merge.

delta register                       # create an account
delta login                          # authenticate
delta track --name my-repo           # link your repository
delta build-mapping && delta push    # seed initial mappings

Then in CI/CD (e.g. GitHub Actions):

- name: Run Delta (affected tests only)
  env:
    DELTA_API_KEY: ${{ secrets.DELTA_API_KEY }}
    DELTA_REPO_ID: ${{ secrets.DELTA_REPO_ID }}
  run: delta run

Configuration

Setting Default Description
deltaCoverage.enabled true Enable or disable inline coverage highlights
deltaCoverage.dbPath "" Custom path to test_mapping.db (auto-detected if empty)
deltaCoverage.maxTestsInTooltip 10 Max number of tests shown in the hover tooltip
deltaCoverage.glowIntensity "normal" Glow intensity: "subtle" / "normal" / "vivid"
deltaCoverage.pythonPath "" Python executable path (auto-detected if empty)

Commands

Command Description
Delta: Refresh Coverage Re-query the database and re-apply decorations
Delta: Toggle Coverage Highlights Show or hide all coverage decorations
Delta: Show Coverage for Current File Refresh and show a coverage notification

How It Works

  1. On file open — Finds the nearest .delta/test_mapping_<branch>.db by walking up to the .git root
  2. Queries the database — Via a bundled Python helper script (no native Node.js bindings required)
  3. Assigns colors — Each test name is hashed to a deterministic HSL hue; lines covered by multiple tests get the blended hue
  4. Applies layered decorations — Outer bloom, glow ring, inner fill, and line wash simulating a soft glow effect
  5. Watches for changes — File watcher with 500ms debounce auto-refreshes highlights after every delta run

Links

  • 🌐 Website: deltatest.dev
  • 📖 Documentation: deltatest.dev/docs
  • 🐛 Issues: GitHub Issues

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft