From the course: Azure Microservices with .NET Core for Developers

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Microservices unit tests

Microservices unit tests - Azure Tutorial

From the course: Azure Microservices with .NET Core for Developers

Start my 1-month free trial

Microservices unit tests

- [Instructor] Microservices will do more harm than good if you don't have a DevOps culture in your organization. DevOps is a union of people, processes, and technology to provide value to customers continually. One of the most significant premises in DevOps is the automation of processes. The automatic execution of unit tests is just one example of process automation. The purpose of a unit test is to validate that each unit of the system has a correct behavior. Let's create a new project in the solution based on this xUnit test project template. There are different testing frameworks for .NET Core. In this case, I'm going to use xUnit because it's modern and very easy to use. Let's name this Ecommerce.Api.Products.Tests. One of the essential parts before sitting to write UnitTest is to define what we're going to test, and what not. There's even a code coverage metric that surfaces how much of your code is being touched by…

Contents