Skip to content
| Marketplace
Sign in
Visual Studio Code>Testing>Precept Test ExplorerNew to Visual Studio Code? Get it now.
Precept Test Explorer

Precept Test Explorer

autom3tion

|
2 installs
| (0) | Free
Discover, configure, and run Precept test automation projects from VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Precept Test Explorer

A VS Code extension for Precept test automation projects (.NET, built on Microsoft.Testing.Platform). It lives in its own Activity Bar view, separate from the built-in Testing view.

Features

  • Test discovery — scans .cs files (including Reqnroll-generated *.feature.cs) for [TestSuite]/[Test]/[TestCase] attributes and builds a tree grouped by project → class → test, without requiring a build.
  • Configuration view — reads precept.json and precept.{environment}.json, shows the effective merged configuration per project, and lets you switch the active environment.
  • Config overrides — edit values from the tree (written into the active environment's overlay file, so changes can be committed), or supply ad-hoc PRECEPT_* environment variable overrides for a single run without touching any file.
  • Config-driven filtering — a project's effective Filter.Include/Filter.Exclude (base config merged with the active environment's overlay) is applied to both test explorers, so a test the config excludes for this environment is genuinely absent from the list rather than just failing when run.
  • Category filtering — filter the visible test tree by [TestCategory] tags.
  • Run & debug — run a project, class, test, or individual data row via dotnet run (which builds the project first, so runs always reflect the latest code), with results (pass/fail/skip, duration, error output) parsed from the TRX report and shown as icons in the tree. Debugging runs an explicit dotnet build and then launches the built assembly under the C# extension's debugger.
  • Report — a dedicated Report view showing the last run's TRX report per project, grouped by class and test, with links to any files a test attached via TestContext.AddResultFile (screenshots, logs, traces). Only appears once a run has produced a TRX report.

Requirements

  • The .NET SDK, with a global.json (at or above the project) containing:
    { "test": { "runner": "Microsoft.Testing.Platform" } }
    
  • The C# extension for the "Debug Test" action.

Settings

Setting Default Description
precept.dotnetPath dotnet Path to the dotnet executable.
precept.defaultEnvironment "" Environment used for runs when none is selected in the Configuration view.
precept.autoRefreshOnSave true Re-scan .cs files for tests when they change.
precept.buildBeforeDiscovery true Reserved for future use; discovery is currently static (source-only) and doesn't require a build.

If runs fail with a CLI/argument error that works fine in a terminal: VS Code launched from Finder/Dock (rather than a terminal) can see a different PATH than your shell, so the unqualified dotnet may resolve to an unrelated or older SDK. The "Precept" output channel logs which dotnet executable was actually resolved before every run — compare it against which dotnet in your terminal, and set precept.dotnetPath to the absolute path if they differ.

Known limitations (v1)

  • Discovery is a heuristic source scanner, not a full C# parser — it assumes conventional formatting and may miss unusual layouts.
  • Running/debugging a single row of a [TestCase]-parameterized test before it has ever run falls back to a name-prefix filter over the method, since Precept doesn't expose the per-row identity until a run has produced a TRX report.
  • Gherkin .feature.cs files must exist on disk (i.e., the project must have been built at least once by Reqnroll's generator) to be discovered.

Development

npm install
npm run watch    # or press F5 to launch an Extension Development Host

npm run compile / npm run package bundle with esbuild; npm run lint and npm run check-types validate the source.

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