Inspired by my running hobby, I built a .NET 8 RESTful API to track amateur runs, focusing on testing mastery. Using Dapper, Docker Compose, and SQL Server with XUnit, Reqnroll, and K6, ensuring robust endpoints.
My procurement-honed discipline—20+ years managing complex projects—drove rigorous testing, a skill I apply to production systems.
This API, inspired by my running hobby, honed my testing skills in Unit, Integrated, Functional and Load tests. Streamlined testing process for maintainable code, applicable to production systems.
In a production environment regarding Unit Tests I always achieved 70% coverage, with 100% on business logic, ensuring reliability.
The Integration Tests target is to have tests covering all endpoints of an Web API and the database.
The Functional Tests has to cover all the Infrastructure layers and the business rules.
The Load Tests is to ensure that the API can handle a certain number of requests per second and that the database can handle the load. It can also be used to do a stress test and see how the API and the database behave under heavy load.
The tech stack used is .NET 8, Dapper, Docker Compose and SQL Server, Xunit, Fluent Assertions, Reqnroll and K6.
In the project repository you will find a detailed explanation of the project, how to run the project and the tests and some screenshots of the API in action.
If you have something to share or discuss about the project, please connect via LinkedIn to discuss testing best practices.