Tran Nguyen Huong

Main Article Content


In recent years, automated test data generation from source code has gained a significant
popularity in software testing. This paper proposes a method, named Hybrid, to generate test data
for unit testing C/C++ projects. The method is a combination of two test data generation methods
named IBVGT and WCFT. In IBVGT method, the source code is analyzed to find simple conditions.
Then, bases on these conditions, IBVGT generates test data for boundary values without having to
solve test paths constraints. This makes the method faster than BVTG method when generating test
data. In Hybrid method, while generating test data using WCFT, simple conditions are collected for
boundary values test data generation. Test data generated by Hybrid are able to ensure both high
source code coverage and error detection ability. In addition, Hybrid is capable of finding infeasible
execution paths and dead code. Experimental results with some popular unit functions show that
Hybrid outperforms STCFG method in terms of test data generation time and boundary values related
error detection. IBVGT is superior to BVTG in term of test data generation time whilst its boundary
values related error detection ability depends on the number of simple conditions inside each unit