Skip to main content

Testing

:::info Status Outline — expand with a walkthrough of writing a new SQLite in-memory integration test. :::

Your scaffolded configuration ships one smoke test (Acme.Tests) proving the checked-in migrations apply cleanly against SQLite in-memory — that's the pattern to keep following as you add entities/behaviors: open a SqliteConnection for the test's lifetime rather than a fresh one per test.

dotnet test Acme.slnx
dotnet test src/Acme.Tests --filter "DisplayName~SomeTestMethodName"

Test coverage tends to stay narrow in practice — much of the day-to-day verification loop is a manual build plus a live browser/curl check against the running app rather than an automated test. If you're verifying a UI change, use a real browser against the running app; type-checking and the test suite verify code correctness, not feature correctness.

Note: the platform team's own reference configuration (KandraWms) has more extensive coverage than a fresh scaffold starts with, including SQLite in-memory integration tests that specifically verify LINQ translates to SQL rather than silently falling back to client-side evaluation — a real EF Core failure mode worth guarding against explicitly as your own test suite grows.