By Topic

Automating Java Program Testing Using OCL and AspectJ

Sign In

Cookies must be enabled to login.After enabling cookies , please use refresh or reload or ctrl+f5 on the browser for the login options.

Formats Non-Member Member
$33 $13
Learn how you can qualify for the best price for this item!
Become an IEEE Member or Subscribe to
IEEE Xplore for exclusive pricing!
close button

puzzle piece

IEEE membership options for an individual and IEEE Xplore subscriptions for an organization offer the most affordable access to essential journal articles, conference papers, standards, eBooks, and eLearning courses.

Learn more about:

IEEE membership

IEEE Xplore subscriptions

2 Author(s)
Yoonsik Cheon ; Dept. of Comput. Sci., Univ. of Texas at El Paso, El Paso, TX, USA ; Carmen Avila

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.

Published in:

Information Technology: New Generations (ITNG), 2010 Seventh International Conference on

Date of Conference:

12-14 April 2010