Holly Cummins on Getting Into and Testing Microservices

Cloud migration and microservices

Testing microservices: the testing pyramid

The testing strategy is known as the test pyramid

  • Unit test. Testing only parts of the microservice. Located at the base of the pyramid, unit tests are quick but depend on your assumptions about the dependencies, so in case your assumptions are wrong, it will give green light to deployment, but fail in production.
  • Integration test. Testing how microservices act together. Integration tests are slow and, in comparison with unit tests, need more work to be set up. To Holly, integration testing is necessary and shouldn’t be left out, yet they can be detrimental in large numbers, so it is best to use contract tests as a middle layer in the test pyramid.
  • Contract test. Testing microservices communication and data consistency with an established document or contract. Contract testing, like unit testing, has a low build time.

Test maintenance: Slow feedback loops and dealing with flaky tests

The bottom line

--

--

Supporting developers with insights and tutorials on delivering good software. · https://semaphoreci.com

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Semaphore

Semaphore

Supporting developers with insights and tutorials on delivering good software. · https://semaphoreci.com