Building Microservices


Every Microservice that you write should have it’s own repository. It should have it’s own build plan which should create a build whenever you make changes in microservices code base/repository. Also a separate set of unit tests need to be triggered when you make changes to the microservice.

Below is the diagram which shows the points.



Testing Microservices

For testing your microservices, you can plan on writing unit tests and integration tests. Unit tests are isolated and should test all public and private methods in Microservices code. Integration tests should be written in such a way so that mock clients can successfully consume public APIs of microservices once it is deployed on server.


Microservices Template

When you are planning to create multiple microservices, it is a good idea to have a template of a microservice and then have developers create microservices from that template instead of writing microservices from scratch every time. This would help in standardizing common things like logging, configuration, authentication, building micro services and health checks across microservices. Otherwise each developer will implement his own idea of these common things and it will get messy.


How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments