Precept 0.10.0

Precept.Core

Core abstractions for the Precept test automation framework: test attributes, the ambient test context, settings, outcome exceptions and the assertion engine.

dotnet add package Precept.Core

Most projects should not reference this directly. Install Precept.TestPlatform instead — it brings Precept.Core with it and adds the runner. Referencing Core on its own is for a library of shared step definitions or helpers that must not drag the runner in.

Everything a test sees lives in the root Precept namespace, so a step definition needs no extra using:

await Assert.That(order.Total).ToBeEqualAsync(42.00m);
await Assert.That(basket.Items).Not.ToBeEmptyAsync();

await Assert.Eventually(() => Db.ScalarAsync<long>("select count(*) from outbox where sent = 0"))
            .Within(TimeSpan.FromMinutes(2))
            .ToBeEqualAsync(0L);

Assertions are awaited, always — an assertion over a value in hand completes synchronously, but the same sentence has to cover an element that is not on the page yet, so waiting lives inside the assertion rather than in a sleep in front of it.


Part of Precept, a .NET 10 test automation framework. Full documentation: assertions · writing your own · configuration · dependency injection

Precept 0.10.0 · MIT · © 2026

Esc