Book Image

Practical Microservices

By : Umesh Ram Sharma
Book Image

Practical Microservices

By: Umesh Ram Sharma

Overview of this book

<p>A microservice architecture helps you build your application as a suite of different services. This approach has been widely adopted as it helps to easily scale up your application with reduced dependencies. This way if a part of your application is corrupted, it can be fixed easily thereby eliminating the possibility of completely shutting down your software. This book will teach you how to leverage Java to build scalable microservices. You will learn the fundamentals of this architecture and how to efficiently implement it practically.</p> <p>We start off with a brief introduction to the microservice architecture and how it fares with the other architectures. The book dives deep into essential microservice components and how to set up seamless communication between two microservice end points. You will create an effective data model and learn different ways to test and deploy a microservices. You will also learn the best way to migrate your software from a monolith to a microservice architecture.</p> <p>Finishing off with monitoring, scaling and troubleshooting, this book will set a solid foundation for you to start implementing microservices.</p>
Table of Contents (17 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Integration testing


Unit test cases perform test checks and verify the code, but they only verify the inside logic of that particular part of the code, not the dependent module. For example, if service layer A method depends on service layer B method, and we are writing test cases for service A, we will mock service B. In this case, service layer A passes all its test cases and the same happens with service layer B. So, test cases for both service layers run perfectly fine individually, but not with each other. So, the verification of service layers is done on an individual level, but communicating with other service methods is also tested in the case of microservices.

This is where we introduce integration testing. It ensures that the all the different layer components work perfectly together and provide the expected results. For example, the data layer is getting data from the database, and the service layer is hitting the database layer and converting data into the desired format to send...