Journal of Software, Vol 5, No 6 (2010), 644-653, Jun 2010
doi:10.4304/jsw.5.6.644-653

An Algorithm for Efficient Assertions-Based Test Data Generation

Ali M. Alakeel

Abstract


Automated assertion-based test data generation has been shown to be a promising tool for generating test cases that reveal program faults. Because the number of assertions may be very large for complex programs, one of the main concerns to the applicability of assertion-based testing is the amount of search time required to explore a potentially large number of assertions. Since assertion-based test data generation is meant to be used after programs have been tested using regular testing methods, e.g. black-box and white box, it is expected that most faults have been removed previously, therefore, a large number of assertions will not be violated. If the number of unpromising assertions can be reduced, then the efficiency of assertion-based test data generation can be significantly improved. This paper presents an algorithm which uses data-dependency analysis among assertions in order to accumulate historical data about previously explored assertions which can then be utilized during future explorations. The results of a small experimental evaluation of this algorithm show that the algorithm may reduce the number of assertions to be explored, hence making assertion-based test data generation more efficient. This improvement my vary depending on the number and relationship among assertions found in each program. For example, in a program named MinMax2 with 5 assertions, there was no improvement while in another program named GCD with 24 assertions, there was more than 50% reduction in number of assertions to be explored.


Keywords


automated software testing; test data generation; software testing; assertion-based testing; program assertions

References



Full Text: PDF


Journal of Software (JSW, ISSN 1796-217X)

Copyright @ 2006-2012 by ACADEMY PUBLISHER – All rights reserved.