All About Testing the Solution
When creating microservices and using continuous integration and continuous delivery (CI/CD), finding errors early is an important part. Having errors in production is costly, and it’s best to find them as early as possible. Testing helps reduce costs by finding errors early.
This chapter covers different kinds of tests needed with microservices solutions. We start creating unit tests, which should be the major tests used because issues are found fast, followed by integration tests, where multiple components of the solution are tested in collaboration. Integration tests can be done in-process where HTTP requests are simulated and in an environment where services are running on the systems, which allows you to test the environment under load.
In this chapter, you’ll learn how to do the following:
- Create unit tests
- Create .NET Aspire integration tests
- Create end-to-end .NET Playwright tests