O'Reilly logo

Microservices in .NET Core: with examples in Nancy by Christian Horsdal Gammelgaard

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Writing tests for microservices

This chapter covers

  • Writing good automated tests
  • Understanding the test pyramid and how it applies to microservices
  • Testing microservices from the outside
  • Writing fast, in-process tests for endpoints
  • Using Nancy.Testing for integration and unit tests

Up to this point, you’ve written a few microservices and set up collaborations between some of them. The implementations are fine, but you haven’t written any tests for them. As you write more and more microservices, developing systems without good automated tests becomes unmanageable. In the first half of this chapter, I’ll discuss what you need to test for each individual microservice. Then we’ll dive into code, looking first at testing endpoints ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required