arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.23922cs.SE

基于不变量的自动测试

Invariant-Driven Automated Testing

Ana Catarina Ribeiro

AI总结:

本研究提出APOSTL语言和PETIT工具,通过扩展API规范语言并自动化测试流程,实现微服务测试的全面自动化。

摘要:

微服务架构是一种新兴技术,将业务逻辑构建为一组小型服务。每个微服务在其进程中运行,通信通过轻量级机制进行,通常为HTTP资源API。这些架构建立在可以独立部署且理论上可靠的软件组件上,这些组件可能由使用该架构的团队开发,也可能不是。如今,行业正危险地迁移到微服务架构中,而没有有效的自动测试过程来测试所使用的软件。此外,当前的API规范语言表达能力不足,无法用于测试目的。为了解决这个问题,有必要扩展目前广泛使用的API规范语言。APOSTL是一种基于一阶逻辑的API规范注解语言,带有某些限制。其目的是通过添加可用于测试目的的属性来扩展当前使用的API描述语言,将这些描述文档转换为有用的测试成果。除了提供测试应用程序所需的信息外,APOSTL还为API提供了语义。此额外信息随后被用来自动化微服务测试。本论文中开发的工作旨在完全自动化微服务测试过程。这是通过实现PETIT工具实现的,该工具能够在提供OpenAPI规范文档(以JSON格式编写并用之前提出规范语言APOSTL正确注释)时测试微服务。该工具能够独立于源代码可用性分析微服务。

英文摘要:

Microservice architectures are an emergent technology that builds business logic into a suite of small services. Each microservice runs in its process and the communication is made through lightweight mechanisms, usually HTTP resource API. These architectures are built upon independently deployable and, supposedly, reliable pieces of software that may, or may not, have been developed by the team using it. Nowadays, industries are dangerously migrating into microservice architectures without an effective and automatic process for testing the software being used. Furthermore, current API specification languages are not expressive enough to be used for testing purposes. To solve this problem it is necessary to extend currently broadly used API specification languages. APOSTL is a specification language to annotate APIs specifications based on first-order logic, with some restrictions. It has the purpose of extending the currently used API description languages with properties that can be useful for testing purposes, transforming these description documents into useful testing artefacts. Besides providing information needed for testing an application, APOSTL also provides an API with semantic. This additional information is then leveraged to automate microservice testing. The work developed in this thesis aims to fully automate the microservice testing process. It is achieved by the implementation of PETIT a tool able to test microservices when provided with an OpenAPI Specification document, written in JSON and properly annotated with the previously proposed specification language, APOSTL. The tool is able to analyze microservices independently from the source code availability.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑