GMock, a Component Testing Framework for gRPC-oriented Services

University essay from KTH/Skolan för elektroteknik och datavetenskap (EECS)

Author: Chuan Su; [2021]

Keywords: ;

Abstract: The Google Remote Procedure Calls (gRPC) framework is arising as a high- performance Remote Procedure Call (RPC) framework with large-scale adoptions for connecting distributed microservices applications. However, testing gRPC-oriented applications is challenging as it requires all the dependent gRPC services to be deployed either locally or remotely, and the test data to be set up correctly in each service prior to testing. We present the design and implementation of a system called GMock, that simulates service composition with test stubs and examines the correctness of the mutual interactions of different components of the system under test (SUT).We have evaluated GMock in terms of its efficiency, coverage and failure detection capability over three real-world microservices applications that are developed in industry. Moreover, we have performed a comparison study among GMock and two open-source testing frameworks, GrpcMock and Grip- Mock, to assess their effectiveness in detecting failures through mutation testing. GMock is efficient in terms of the test run time and is able to achieve relatively high coverage. The results of our comparison experiments show that the test suites written in GMock outperform the test suites of GrpcMock and GripMock in detecting faults, and the test suites written in GMock are able to achieve minimum 97% of the mutation coverage in our experiments, which shows that GMock is capable of testing real-world service-oriented applications that are based on gRPC communication protocol. 

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)