TY - GEN
T1 - An improved memetic algorithm with method dependence relations (MAMDR)
AU - Aburas, Ali
AU - Groce, Alex
N1 - Publisher Copyright:
© 2014 IEEE.
PY - 2014/11/14
Y1 - 2014/11/14
N2 - Search-based approaches are successfully used for generating unit tests for object-oriented programs in Java. However, these approaches may struggle to generate sequence method calls with specific values to achieve high coverage due to the large size of the search space. This paper proposes a memetic algorithm (MA) approach in which static analysis is used to identify method dependence relations (MDR) based on the field access. This method dependence information is employed for reducing the search space and used to guide the search towards regions that lead to full (or at least high) structural coverage. Our approach, MAMDR, combines both a genetic algorithm (GA) and Hill Climbing (HC) to generate test data for Java programs. The former is used to produce test cases that maximize the branch coverage of the CUT, while minimizing the length of each test case. The latter is used to target uncovered branches in the preceding search phase using static information that guides the search to generate sequences of method calls and values that could cover target branches. We compare MAMDR with pure random testing, a well-known search based approach (EvoSuite), and a simple MA on several open source projects and classes, and show that the combination of MA and MDR is effective.
AB - Search-based approaches are successfully used for generating unit tests for object-oriented programs in Java. However, these approaches may struggle to generate sequence method calls with specific values to achieve high coverage due to the large size of the search space. This paper proposes a memetic algorithm (MA) approach in which static analysis is used to identify method dependence relations (MDR) based on the field access. This method dependence information is employed for reducing the search space and used to guide the search towards regions that lead to full (or at least high) structural coverage. Our approach, MAMDR, combines both a genetic algorithm (GA) and Hill Climbing (HC) to generate test data for Java programs. The former is used to produce test cases that maximize the branch coverage of the CUT, while minimizing the length of each test case. The latter is used to target uncovered branches in the preceding search phase using static information that guides the search to generate sequences of method calls and values that could cover target branches. We compare MAMDR with pure random testing, a well-known search based approach (EvoSuite), and a simple MA on several open source projects and classes, and show that the combination of MA and MDR is effective.
KW - Memetic Algorithms
KW - Object-Oriented
KW - Search Based Software Testing
KW - Search Space Reduction
KW - Static Analysis
UR - http://www.scopus.com/inward/record.url?scp=84912080491&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=84912080491&partnerID=8YFLogxK
U2 - 10.1109/QSIC.2014.12
DO - 10.1109/QSIC.2014.12
M3 - Conference contribution
AN - SCOPUS:84912080491
T3 - Proceedings - International Conference on Quality Software
SP - 11
EP - 20
BT - Proceedings - International Conference on Quality Software
PB - IEEE Computer Society
T2 - 14th International Conference on Quality Software, QSIC 2014
Y2 - 2 October 2014 through 3 October 2014
ER -