Conference Paper

A Heuristic Approach to Break Cycles for the Class Integration Test Order Generation.

Miao Zhang, Jacky W. Keung, Yan Xiao, Md. Alamgir Kabir, Shuo Feng
COMPSAC (1) 2019 10.1109/COMPSAC.2019.00016

Abstract

It is a general objective to minimize overall stubbing cost when performing class integration test order generation. Existing approaches are unable to obtain a costoptimal class test order, this is largely due to the lack of a comprehensive analysis on the factors that affect overall stubbing cost, i.e., the number of required test stubs and the corresponding stubbing complexity. To address this issue, we propose an approach called HBCITO (Heuristic approach to Break Cycles for the class Integration Test Order generation). Given a set of removed dependencies, a heuristic algorithm is employed to search for a near ideal set of class dependencies. Such dependencies break the same or greater number of cycles as the initialized dependencies but attract less stubbing cost. The experimental results show that HBCITO is capable of generating class test orders with significantly lower stubbing cost compared with other approaches. Keywords-integration testing; class integration test order generation; break cycles; stubbing complexity I. I NTRODUCTION In integration testing, deciding the order in which classes are tested is non-trivial due to cycles among class dependencies [1]. When cycles exist, test stubs are inevitable since the dependent class can be unavailable. Various class test orders cause different test stubs, and consequently, different overall stubbing cost. Class integration test order generation aims to devise an optimal class test order attracting the minimum stubbing cost. Most of graph-based approaches are unable to determine an optimal class test order since their cycle-breaking strategies ignore two factors that impact the stubbing cost, i.e., the number of created test stubs and the corresponding stubbing complexity. This limitation also occurs in searchbased methods due to the lack of sufficient guidance in the search process. To minimize overall stubbing cost by fully considering the aforementioned two factors, we propose a heuristic approach to break cycles for the class integration test order generation called HBCITO. Inspired by evolutionary algorithms, we put forward exploration and exploitation methods to break cycles when performing class integ

Keywords