Abstract:
An emerging trend has begun with the introduction of microservices architecture, transform-ing monolithic applications into microservices. These services are focused on smaller inde-pendent autonomous services, which encourage development, deployment, scale, and main-tain each service independently with improved parallel development among multiple auton-omous development teams. Unlike the monolith microservices, architecture introduces addi-tional testing challenges.
Microservices integration testing, a crucial process that ensures the communication paths are correct while interacting with other services. Because of this unique architecture, testing in-tegration in isolation impose a challenge due to many reasons, such as each microservice is developed and maintained by individual autonomous teams, unavailability or instability of service due to parallel continuous rapid development, deployment and difficulty in setting up all the services and seed the necessary data for testing in a local or a remote development environment. This process requires effort to initialize and maintain the resource-intensive environment. Currently, available testing approaches or tools have particular limitations. Such approaches or tools require extra effort to create, initialize and maintain with the rapid-ly changing unstable services and requirements. Gradually with the introduction of new ser-vices as the number of services is greater this process turns in to a development overhead.
The main objective of this research is to overcome the integration testing challenges in REST-based microservices, via a service virtualization solution based on widely adapted Open API specification. The proposed implemented solution was evaluated against the exist-ing services. The solution is proven to mitigate the identified integration testing challenges in microservices and successfully emulates the tested producer services via the virtualization of its Open API specification. The solution facilitates reproducing the edge cases and failures, such is difficult to produce in the real services, and this helps to reduce the development time significantly. The solution can evolve with the services due to the OAS of the respective ser-vice reflects the producer services’ additions or its changes. Because of this reason, unlike the existing approaches or tools, this solution does not require any maintenance via mocking, simulation by the record and replay requests or as a third-party dependency package or a li-brary to the producer and consumer source code to reflect the service changes or additions. This report concludes by mentioning research contributions, limitations, and future works of the implemented solution.
Citation:
Vidyarathne, VV. (2021). Comprehensive testing framework for microservices [Master's theses, University of Moratuwa]. Institutional Repository University of Moratuwa. http://dl.lib.uom.lk/handle/123/20775