Test Coverage in Microservice Systems: An Automated Approach to E2E and API Test Coverage Metrics

被引:3
作者
Abdelfattah, Amr S. [1 ]
Cerny, Tomas [2 ]
Yero, Jorge [1 ]
Song, Eunjee [1 ]
Taibi, Davide [3 ]
机构
[1] Baylor Univ, Dept Comp Sci, Waco, TX 76706 USA
[2] Univ Arizona, Dept Syst & Ind Engn, Tucson, AZ 85721 USA
[3] Univ Oulu, Fac Informat Technol & Elect Engn, M3S, Oulu 90570, Finland
基金
美国国家科学基金会;
关键词
microservices; end-to-end testing; API tests; test quality;
D O I
10.3390/electronics13101913
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Test coverage is a critical aspect of the software development process, aiming for overall confidence in the product. When considering cloud-native systems, testing becomes complex, as it becomes necessary to deal with multiple distributed microservices that are developed by different teams and may change quite rapidly. In such a dynamic environment, it is important to track test coverage. This is especially relevant for end-to-end (E2E) and API testing, as these might be developed by teams distinct from microservice developers. Moreover, indirection exists in E2E, where the testers may see the user interface but not know how comprehensive the test suits are. To ensure confidence in health checks in the system, mechanisms and instruments are needed to indicate the test coverage level. Unfortunately, there is a lack of such mechanisms for cloud-native systems. This manuscript introduces test coverage metrics for evaluating the extent of E2E and API test suite coverage for microservice endpoints. It elaborates on automating the calculation of these metrics with access to microservice codebases and system testing traces, delves into the process, and offers feedback with a visual perspective, emphasizing test coverage across microservices. To demonstrate the viability of the proposed approach, we implement a proof-of-concept tool and perform a case study on a well-established system benchmark assessing existing E2E and API test suites with regard to test coverage using the proposed endpoint metrics. The results of endpoint coverage reflect the diverse perspectives of both testing approaches. API testing achieved 91.98% coverage in the benchmark, whereas E2E testing achieved 45.42%. Combining both coverage results yielded a slight increase to approximately 92.36%, attributed to a few endpoints tested exclusively through one testing approach, not covered by the other.
引用
收藏
页数:22
相关论文
共 37 条
[1]  
Abdelfattah Amr S., 2023, Service-Oriented and Cloud Computing: 10th IFIP WG 6.12 European Conference, ESOCC 2023, Proceedings. Lecture Notes in Computer Science (14183), P35, DOI 10.1007/978-3-031-46235-1_3
[2]   Towards Security-Aware Microservices: On Extracting Endpoint Data Access Operations to Determine Access Rights [J].
Abdelfattah, Amr S. ;
Schiewe, Micah ;
Curtis, Jacob ;
Cerny, Tomas ;
Song, Eunjee .
PROCEEDINGS OF THE 13TH INTERNATIONAL CONFERENCE ON CLOUD COMPUTING AND SERVICES SCIENCE, CLOSER 2023, 2023, :15-23
[3]   Roadmap to Reasoning in Microservice Systems: A Rapid Review [J].
Abdelfattah, Amr S. S. ;
Cerny, Tomas .
APPLIED SCIENCES-BASEL, 2023, 13 (03)
[4]  
Amazon Web Services, 2024, ELK Stack
[5]  
[Anonymous], 2024, Gatling Contributors Gatling
[6]  
[Anonymous], 2024, JavaParser Contributors JavaParser
[7]  
[Anonymous], 2024, Selenium Contributors Selenium
[8]  
Apache Software Foundation, 2024, Apache SkyWalking Documentation
[9]  
Ball T, 1999, LECT NOTES COMPUT SC, V1687, P216, DOI 10.1145/318774.318944
[10]  
Bhojwani R., 2018, Design patterns for microservice-to-microservice communication-DZone microservices