Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Haskell Test RunnerNew to Visual Studio Code? Get it now.
Haskell Test Runner

Haskell Test Runner

Arjun Shekar Bharadwaj

|
2 installs
| (0) | Free
Run and watch Haskell Cabal and Stack test suites (Hspec, Tasty, and custom runners) in the VS Code Testing sidebar.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Haskell Test Runner

CI Publish Extension VS Code Marketplace License: MIT

Run, watch, and inspect Haskell Cabal and Stack tests directly from the VS Code Testing sidebar and editor gutter.

Features

  • Testing Sidebar & Gutter Play Buttons — Discovers packages and test-suite targets from cabal.project, *.cabal, stack.yaml, and package.yaml (hpack) files.
  • Multi-Framework Support — Works with Hspec, Tasty, and custom exitcode-stdio-1.0 test runners.
  • Watch Mode (Continuous Run) — Click the Testing eye icon to rerun tests automatically when you save .hs, .lhs, .cabal, package.yaml, or stack.yaml files.
  • Parametrized Test Discovery — Uses --dry-run (Hspec) and --list-tests (Tasty) to list dynamically generated test cases.
  • Timings, Diffs & Failure Navigation — Displays per-test durations, expected/actual diffs, and jumps straight to the failing File.hs:line:col.
  • DevContainer Friendly — Set haskellTestRunner.commandPrefix (e.g. ./exec.sh) to run cabal test or stack test inside Docker from a host VS Code window.

Quick Start

  1. Install Haskell Test Runner from the VS Code Marketplace (or run code --install-extension arjunswaj.haskell-test-runner).
  2. Open any Haskell Cabal or Stack workspace (*.cabal, cabal.project, stack.yaml, or package.yaml).
  3. Open the Testing sidebar (beaker icon) or click the green play icon next to any test.

Requirements

  • GHC and Cabal or Stack available on PATH (locally, inside a Dev Container, or via haskellTestRunner.commandPrefix).

Extension Settings

Setting Default Description
haskellTestRunner.buildTool "auto" Build tool selection ("auto", "cabal", or "stack").
haskellTestRunner.commandPrefix "" Optional command prefix prepended before the build tool (e.g. "./exec.sh").
haskellTestRunner.cabalPath "cabal" Path to the cabal executable.
haskellTestRunner.stackPath "stack" Path to the stack executable.
haskellTestRunner.extraTestArgs [] Extra arguments appended to cabal test or stack test.
haskellTestRunner.runtimeDiscovery true Discover dynamic/parametrized Hspec and Tasty cases at runtime.

Development

For contributor architecture notes and diagrams, see docs/ARCHITECTURE.md.

Credits

Built and architected in collaboration with Agy Neon (Antigravity / Gemini 4 Neon).

Author & License

Arjun Shekar Bharadwaj — Licensed under the MIT License.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft