Microservice architecture gains momentum by fueling systems with cloud-native benefits, scalability, and decentralized evolution. However, new challenges emerge for end-to-end (E2E) testing. Testers who see the decentralized system through the user interface might assume their tests are comprehensive, covering all middleware endpoints scattered across microservices. However, they do not have instruments to verify such assumptions. This paper introduces test coverage metrics for evaluating the extent of E2E test suite coverage for microservice endpoints. Next, it presents an automated approach to compute these metrics to provide feedback on the completeness of E2E test suites. Furthermore, a visual perspective is provided to highlight test coverage across the system's microservices to guide on gaps in test suites. We implement a proof-of-concept tool and perform a case study on a well-established system benchmark showing it can generate conclusive feedback on test suite coverage over system endpoints.
翻译:微服务架构凭借其云原生优势、可扩展性与去中心化演进特性,正驱动系统蓬勃发展。然而,端到端(E2E)测试面临新的挑战。通过用户界面审视去中心化系统的测试人员可能想当然地认为其测试已覆盖散布于各微服务间的所有中间件端点,但缺乏验证该假设的量化手段。本文提出了一套用于评估微服务端点的E2E测试套件覆盖程度的测试覆盖度指标,进而给出自动化计算这些指标的方案,以提供E2E测试套件完备性的反馈。此外,通过可视化视角突出展示跨系统微服务的测试覆盖情况,引导定位测试套件中的覆盖疏漏。我们实现了概念验证工具,并在成熟的系统基准测试上开展案例研究,结果表明该工具能够就系统端点的测试套件覆盖情况生成结论性反馈。