Declarative Domain Testing: An Approach for Automatic and Integrated Test Data Generation
摘要
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.