Reducing the Number of Initial Database States for Integration Testing

This research focuses on integration testing of enterprise systems, more concretely on how to automatically generate the initial test data to be entered into the relational database to support each test case. Existing approaches generate initial database entries for each test case one-by-one, but there are two problems with this approach. The first problem is that switching initial database states for each test case is too time consuming when we use the generated initial database states for testing. The second problem is that the total number of DB records tends to be large because many initial database states are generated. As a result, the total size of test data becomes large, which increases the cost of managing the test data and the time needed to switch initial database states for each test case. To solve these problems, we propose a framework for generating initial database states that are shared by multiple test cases. We list up the three key challenges (test case grouping, DB record arrangements, and initial database state constraint generation), and then introduce simple and reasonable solutions for each challenge. Using industrial-level enterprise systems, we confirm that our proposal reduces the number of initial database states by 49%, and the total number of DB records by 47%.