Precept 0.14.0

Project templates

Precept ships dotnet new templates, so a new suite starts with environment switching, precept.json overlays and a first test already in place.

Install them from NuGet:

dotnet new install Precept.Templates

Run the same command again after a new release. It installs the newer version over the older one.

Create a project:

# Plain C# tests + Precept.Web
dotnet new precept-web -n Checkout.Web.Tests

# Reqnroll feature tests + Precept.Web
dotnet new precept-web-reqnroll -n Checkout.Web.Reqnroll.Tests

Each template includes:

  • global.json set to Microsoft.Testing.Platform, which dotnet test on .NET 10 needs. It is in the right place for a project that is a repository of its own. Inside a larger repository, move its test section into the root global.json: the SDK reads the file from the directory you run dotnet test in, not from the project's, and a nested one also replaces the root's SDK pin for that subtree.
  • precept.json with Environment: local and web defaults: headless Chromium at a 1080p viewport.
  • precept.staging.json, an overlay for staging, used with --precept-environment staging.
  • A starter test, either plain C# or a .feature file with its steps.

The templates leave build configurations alone: Debug and Release as the SDK defines them, and nothing bound to PreceptEnvironment. How an environment is chosen is up to you. See Environments, including a configuration per environment.

Precept.Web uses Playwright. The first time a launch finds no browser to drive, it installs the one it is configured for; see Browsers. To install it up front instead:

pwsh bin/Debug/net10.0/playwright.ps1 install chromium

Precept 0.14.0 · MIT · © 2026

Esc