DocumentCode
2891775
Title
Automating Java Program Testing Using OCL and AspectJ
Author
Cheon, Yoonsik ; Avila, Carmen
Author_Institution
Dept. of Comput. Sci., Univ. of Texas at El Paso, El Paso, TX, USA
fYear
2010
fDate
12-14 April 2010
Firstpage
1020
Lastpage
1025
Abstract
Random testing can eliminate subjectiveness in constructing test data and increase the diversity of test data. However, one difficult problem is to construct test oracles that decide test results - test failures or successes. Assertions can be used as test oracles and are most effective when they are derived from formal specifications such as OCL constraints. Random testing, if fully automated, can reduce the cost of testing dramatically. We propose an automated testing approach for Java programs by combining random testing and OCL. The key idea of our approach is to use OCL constraints as test oracles by translating them to runtime checks written in AspectJ. We implement our approach by adapting existing frameworks for translating OCL to AspectJ and assertion-based random testing. We evaluate the effectiveness of our approach through case studies and experiments. The results are encouraging in that our approach can detect errors in both implementations and OCL constraints and provide a practical means for using OCL.
Keywords
Java; formal specification; object-oriented languages; program testing; AspectJ; Java program testing; OCL constraints; assertion-based random testing; formal specifications; object constraint language; test oracles; Automatic testing; Computer science; Costs; Diversity reception; Formal specifications; Information technology; Java; Protection; Runtime; Unified modeling language; AspectJ; Object Constraint Language; pre and postconditions; random testing; runtime assertion checking;
fLanguage
English
Publisher
ieee
Conference_Titel
Information Technology: New Generations (ITNG), 2010 Seventh International Conference on
Conference_Location
Las Vegas, NV
Print_ISBN
978-1-4244-6270-4
Type
conf
DOI
10.1109/ITNG.2010.123
Filename
5501499
Link To Document