Software testing is crucial to any information system to ensure code correctness and validity. Currently, test design and implementation are essentially manual, which makes them error-prone and time-consuming. Moreover, generating a valid system state required to initiate testing can be challenging when this state must satisfy a set of business rules. In this paper, we propose a new approach based on specifying the tests declaratively, and using an automatic generation of business-rule-compliant initial test states from this specification. In our approach, users declaratively specify the required system state, together with the domain business rules it must satisfy, and we delegate to an automated reasoner the creation of the valid initial state. We also show how the approach can be effectively implemented in Java, and we share experimental results showcasing its feasibility in a realistic project.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Declarative Domain Testing: An Approach for Automatic and Integrated Test Data Generation

  • José Francisco Crespo,
  • Martí Juanola,
  • Xavier Oriol,
  • Ernest Teniente

摘要

Software testing is crucial to any information system to ensure code correctness and validity. Currently, test design and implementation are essentially manual, which makes them error-prone and time-consuming. Moreover, generating a valid system state required to initiate testing can be challenging when this state must satisfy a set of business rules. In this paper, we propose a new approach based on specifying the tests declaratively, and using an automatic generation of business-rule-compliant initial test states from this specification. In our approach, users declaratively specify the required system state, together with the domain business rules it must satisfy, and we delegate to an automated reasoner the creation of the valid initial state. We also show how the approach can be effectively implemented in Java, and we share experimental results showcasing its feasibility in a realistic project.