Precept.TestPlatform
0.10.0
dotnet add package Precept.TestPlatform --version 0.10.0
NuGet\Install-Package Precept.TestPlatform -Version 0.10.0
<PackageReference Include="Precept.TestPlatform" Version="0.10.0" />
<PackageVersion Include="Precept.TestPlatform" Version="0.10.0" />
<PackageReference Include="Precept.TestPlatform" />
paket add Precept.TestPlatform --version 0.10.0
#r "nuget: Precept.TestPlatform, 0.10.0"
#:package Precept.TestPlatform@0.10.0
#addin nuget:?package=Precept.TestPlatform&version=0.10.0
#tool nuget:?package=Precept.TestPlatform&version=0.10.0
Precept.TestPlatform
Precept's test runner: a Microsoft.Testing.Platform
test framework that discovers and executes Precept tests. A test project starts here — this
package brings in Precept.Core, makes the project an executable and generates its entry point.
dotnet add package Precept.TestPlatform
public class CheckoutTests
{
[Test("A customer can check out")]
[Retry(2, DelayMilliseconds = 200)]
public async Task Checkout()
{
var response = await Rest.Post("/orders")
.WithJsonBody(new { sku = "ABC", quantity = 2 })
.SendAsync();
await Assert.That(response).ToHaveStatusAsync(HttpStatusCode.Created);
}
}
There is no Main and no OutputType to write. The first build leaves a commented precept.json
in the project.
One thing a NuGet package cannot do for you: on the .NET 10 SDK, dotnet test has to be told to use
Microsoft.Testing.Platform, in a global.json at the repository root — the SDK reads it from the
directory dotnet test is run in and upward, not from the project's.
{
"test": {
"runner": "Microsoft.Testing.Platform"
}
}
Without it dotnet test fails with "Testing with VSTest target is no longer supported". Running the
test binary directly — dotnet run -- --list-tests — works either way.
Part of Precept, a .NET 10 test automation framework. Full documentation: running a suite · execution model · filtering · configuration · environment variables
| Product | Versions 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. |
-
net10.0
- Microsoft.Extensions.Configuration (>= 10.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.0)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.0)
- Microsoft.Extensions.Configuration.Json (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- Microsoft.Testing.Extensions.TrxReport (>= 2.3.3)
- Microsoft.Testing.Extensions.TrxReport.Abstractions (>= 2.3.3)
- Microsoft.Testing.Platform (>= 2.3.3)
- Microsoft.Testing.Platform.MSBuild (>= 2.3.3)
- Precept.Core (>= 0.10.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.