Conceptual guidance on testing principles and practices for .NET applications, including frameworks, test types, and CI/CD integration.
Dotnet Testing describes principles, methods and practices for ensuring quality in .NET applications. It covers unit, integration and end-to-end testing, test automation, frameworks (xUnit, NUnit), mocking and continuous testing within CI/CD. It also addresses metrics, test strategies and common risks like flaky tests and insufficient coverage.
Percentage of code executed by tests. Indicator for exercised areas but not a sole quality metric.
Total CI pipeline runtime including tests; important for feedback speed.
Share of intermittent test failures; measures stability of the test base.
Small NuGet package uses extensive unit tests with xUnit and mocking to secure API behavior.
Integration test pipeline starts Postgres and RabbitMQ containers via Testcontainers and validates message flows.
End-to-end tests automate user journeys against a web app deployed in test environment and verify critical paths.
Evaluate test frameworks and define conventions
Extend CI pipeline and automate test runs
Introduce metrics, analyze flakiness and stabilise tests