Automatic stub generation based on interval reduction
Yunzhan Gong · Journal of Tsinghua University(Science and Technology) · 2011
An automatic stub generation method was developed to improve the efficiency and coverage of unit tests.The method first selects a path and then uses path sensitive,variable interval arithmetic to calculate the path constraints with constraints used to reduce the callee return interval.The system then automatically generates the stub code using the reduced interval.The system was implemented in a unit automatic test system to validate many open source projects.The results show that the average unit coverage is from 50% to 81%.For functions with many equality expressions,the coverage is improved 10 fold.The tests show that this technique for unit tests improves the coverage of automatic unit tests.