How to best approach microservice unit testing

Please consider carefully if you want to go the “KPI route” in regards of unit test coverage because this is for sure a rabbit hole.

Personally, I’d start with

  • risk. Which code is super important, crucial, complicated. Start there.
  • use refactoring as starting point to then add unit tests.
  • what do the devs want? Make it a shared decision.

That should get you going.

5 Likes