Quality and testing
Tests, practices and analysis so that changes do not break what already worked.
Kinds of test
Unit tests
Check one unit in isolation, with no database or network. Fast, and the most numerous.
Used in projectsIntegration tests
Verify that several pieces really work together, database included.
Used in projectsEnd-to-end tests
Walk the whole flow the way a user would, through the real interface.
Used in projectsTesting pyramid
Many unit tests, some integration, few end-to-end: cost weighed against confidence.
Used in projectsLoad testing
Measure how the system behaves under pressure and where its breaking point is.
LearningContract testing
Check two services still honour their shared contract, without deploying them together.
LearningTesting in .NET
xUnit
Unit testing framework for .NET, the usual choice in new projects.
Used in projectsNUnit
Veteran .NET unit testing framework, still widely used.
Used in projectsMoq
Test double library for .NET: replaces dependencies and verifies calls.
Used in projectsFluentAssertions
Readable assertions that also explain clearly why a test failed.
LearningNSubstitute
An alternative to Moq with lighter syntax for creating test doubles.
LearningTestcontainers
Spins up real databases or queues in Docker during integration tests.
LearningBenchmarkDotNet
Rigorous performance measurement in .NET, with serious statistics behind each figure.
LearningTesting in JavaScript
Cypress
End-to-end tests in the browser, running alongside the real application.
Used in projectsMocha
JavaScript test framework, flexible and agnostic about assertions.
Used in projectsJest
JavaScript test framework with assertions, mocks and coverage built in.
Used in projectsVitest
Test runner on top of Vite, compatible with the Jest API and considerably faster.
LearningPlaywright
Browser automation for end-to-end tests, with auto-waiting and cross-browser support.
LearningTesting Library
Test components the way a person uses them, by role and text, not by internals.
LearningPractices
TDD
Write the failing test first, then the minimum code that makes it pass.
Used in projectsCode review
Peer review: catches problems early and spreads knowledge of the codebase.
Used in projectsDefinition of Done
The explicit agreement on when something is truly finished, not merely written.
Used in projectsPair programming
Programming in twos: continuous review and fast transfer of context.
LearningBDD
Describe the expected behaviour in business language before implementing it.
LearningAnalysis and metrics
SonarQube
Continuous static analysis: finds bugs, code smells and security issues.
Used in projectsStatic analysis
Finding defects by reading the code, without ever running it.
Used in projectsCode coverage
How much of the code the tests execute. Useful as a signal, dangerous as a target.
Used in projectsTechnical debt
The future cost of today's shortcuts: it has to be visible to be decided on.
Used in projects