Book Image

Hands-On Microservices ??? Monitoring and Testing

By : Dinesh Rajput
5 (1)
Book Image

Hands-On Microservices ??? Monitoring and Testing

5 (1)
By: Dinesh Rajput

Overview of this book

Microservices are the latest "right" way of developing web applications. Microservices architecture has been gaining momentum over the past few years, but once you've started down the microservices path, you need to test and optimize the services. This book focuses on exploring various testing, monitoring, and optimization techniques for microservices. The book starts with the evolution of software architecture style, from monolithic to virtualized, to microservices architecture. Then you will explore methods to deploy microservices and various implementation patterns. With the help of a real-world example, you will understand how external APIs help product developers to focus on core competencies. After that, you will learn testing techniques, such as Unit Testing, Integration Testing, Functional Testing, and Load Testing. Next, you will explore performance testing tools, such as JMeter, and Gatling. Then, we deep dive into monitoring techniques and learn performance benchmarking of the various architectural components. For this, you will explore monitoring tools such as Appdynamics, Dynatrace, AWS CloudWatch, and Nagios. Finally, you will learn to identify, address, and report various performance issues related to microservices.
Table of Contents (11 chapters)

Contract testing

Contract testing is all about testing the contract between the consumer and producer services. Consider the following diagram showing contract testing:

As you can see in this diagram, each consumer has a particular contract with the producer. This contract is about the expected structure of input and output data between the producer and consumer services. Each consumer service has a different contract with the producer service, as per as its requirements. If services change over time, then contracts between the services must be satisfied.

Contract testing tests the input and output of service calls that contain certain attributes and also tests throughput latency. Contract testing is not a component test; it doesn't test the component deeply, but rather, it only tests the data structure with the required attributes for the input and output of service calls...