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

Author:

Abdelfattah Amr S.1ORCID,Cerny Tomas2ORCID,Yero Jorge1ORCID,Song Eunjee1ORCID,Taibi Davide3ORCID

Affiliation:

1. Department of Computer Science, Baylor University, Waco, TX 76706, USA

2. Department of Systems and Industrial Engineering, University of Arizona, Tucson, AZ 85721, USA

3. M3S, Faculty of Information Technology and Electrical Engineering, University of Oulu, 90570 Oulu, Finland

Abstract

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.

Funder

National Science Foundation

Academy of Finland

Publisher

MDPI AG

Reference37 articles.

1. Tsai, W.T., Bai, X., Paul, R., Shao, W., and Agarwal, V. (2001, January 8–12). End-to-end integration testing design. Proceedings of the 25th Annual International Computer Software and Applications Conference, COMPSAC 2001, Chicago, IL, USA.

2. Ehsan, A., Abuhaliqa, M.A.M., Catal, C., and Mishra, D. (2022). RESTful API testing methodologies: Rationale, challenges, and solution directions. Appl. Sci., 12.

3. Sharma, A., and Revathi, M. (2018, January 15–16). Automated API testing. Proceedings of the 2018 3rd International Conference on Inventive Computation Technologies (ICICT), Coimbatore, India.

4. Bhojwani, R. (2024, May 10). Design Patterns for Microserviceto-Microservice Communication-Dzone Microservices. Available online: https://dzone.com/articles/design-patterns-for-microservices.

5. Microservice Testing Approaches: A Systematic Literature Review;Ghani;Int. J. Integr. Eng.,2019

Cited by 1 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3