TY - JOUR AU - Huong, Tran Nguyen AU - Kha, Do Minh AU - Tran, Hoang -Viet AU - Hung, Pham Ngoc PY - 2022/12/16 TI - A Hybrid Method for Test Data Generation for Unit Testing of C/C++ Projects JF - VNU Journal of Science: Computer Science and Communication Engineering; Vol 39 No 2DO - 10.25073/2588-1086/vnucsce.354 KW - N2 - 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 IIBVTG and WCFT. In IBVTG method, the source code is analyzed to find simple conditions. Then, bases on these conditions, IBVTG 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. IBVTG 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 function. Keywords: Unit testing, test data generation, concolic testing, weighted CFG, boundary value analysis. UR - //jcsce.vnu.edu.vn/index.php/jcsce/article/view/354