Precept.TestData 0.11.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Precept.TestData --version 0.11.0
                    
NuGet\Install-Package Precept.TestData -Version 0.11.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Precept.TestData" Version="0.11.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Precept.TestData" Version="0.11.0" />
                    
Directory.Packages.props
<PackageReference Include="Precept.TestData" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Precept.TestData --version 0.11.0
                    
#r "nuget: Precept.TestData, 0.11.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Precept.TestData@0.11.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Precept.TestData&version=0.11.0
                    
Install as a Cake Addin
#tool nuget:?package=Precept.TestData&version=0.11.0
                    
Install as a Cake Tool

Precept.TestData

Test data management for Precept: environment-specific data sets for the users, clients, vehicles and anything else a suite needs, generated values, factories that create and clean up data in the system under test, and pooled records leased to one test at a time.

dotnet add package Precept.TestData
services.AddPreceptTestData();
// testdata.json, beside the test binary
{
  "users": {
    "admin": { "username": "admin@acme.test", "password": "{{env:ADMIN_PASSWORD}}" }
  },
  "clients": {
    "new": { "name": "Acme {{unique}}", "email": "acme-{{unique}}@acme.test" }
  }
}
var admin = TestData.Get<TestUser>("admin");
var password = TestData.Value("users:admin:password");

testdata.json is overlaid by testdata.{environment}.json and then by PRECEPT_TESTDATA__* environment variables. That is how a password reaches a run without being written down in the repository.

Values may carry tokens such as {{unique}}, {{run}}, {{guid}}, {{now:+2d}}, {{date:-80y:-18y}}, {{decimal:1.00-99.99}} and {{pick:red|green|blue}}. They are expanded when a value is read, so a suite that inserts the same email address on every run stops failing on the second one. {{unique}} is the same value throughout a scenario, so every step sees what the first one created, and a retry generates a fresh one. TestData.Resolve expands tokens in a string that came from a feature file, and Resolve<T> reads the result as a number or a date.

The module's types live in the root Precept namespace, so a step definition needs no further using.

A coding agent can get all of this, checked against the project in front of it, from precept_explain_testdata in Precept.Mcp.


Part of Precept, a .NET 10 test framework built on Microsoft.Testing.Platform. Full documentation: test data · dynamic values · factories · pooled data · from Gherkin

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.12.0 44 9/19/2026
0.11.1 77 9/16/2026
0.11.0 72 9/15/2026
0.10.0 95 9/10/2026
0.8.0 84 9/10/2026
0.7.0 93 9/9/2026
0.6.0 99 9/2/2026
0.5.1 94 9/2/2026
0.5.0 91 9/1/2026
0.4.1 121 8/16/2026
0.4.0 114 8/16/2026
0.3.0 111 8/15/2026
0.2.0 112 8/15/2026
0.1.3 108 8/13/2026
0.1.2 116 8/13/2026
0.1.1 106 8/13/2026
0.1.0 110 8/12/2026