Precept 0.10.0

Project templates

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

Install them from NuGet:

dotnet new install Precept.Templates

The same command installs a later version over an earlier one, so run it again to pick up templates from a new release.

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 for dotnet test on .NET 10. 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 dotnet test is run 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 as an overlay for staging, reached with --precept-environment staging.
  • A starter test (plain or .feature + 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 yours to decide; see Environments for the ways, including a configuration per environment.

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

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

Precept 0.10.0 · MIT · © 2026

Esc