Testing Java Exceptions: An Instrumentation Technique

Quality can be defined as the level of adequacy between the final product and its specification. Software industries use many testing methodologies to assure the high-quality of their software. Code coverage is one of these methodologies usually applied to test the expected (normal) behavior of software. Exception handling structures mainly appear in software code to deal with problems caused by unexpected behavior. Because of this, they are not completely covered with the techniques for testing programs normal behavior. To overcome this limit, we present the Verify Ex, a Java class prototype, together with a Java source code instrumentation technique to exercise exception handling structures. The result is an increase of code coverage rate due to the inclusion of programs exceptional behavior in the testing execution and code coverage analysis.

[1]  A. Jefferson Offutt,et al.  Introduction to Software Testing , 2008 .

[2]  Baowen Xu,et al.  A New Mutation Analysis Method for Testing Java Exception Handling , 2009, 2009 33rd Annual IEEE International Computer Software and Applications Conference.

[3]  Sebastian G. Elbaum,et al.  Amplifying tests to validate exception handling code , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[4]  Cem Kaner,et al.  Foundations of Software Testing , 2013 .

[5]  Simone Hanazumi,et al.  Exercising Java Exceptions Using Java Pathfinder and Program Instrumentation , 2014, ICCSA.

[6]  Saurabh Sinha,et al.  Analysis and Testing of Programs with Exception Handling Constructs , 2000, IEEE Trans. Software Eng..

[7]  Paulo Marques,et al.  Exception Handling: A Field Study in Java and .NET , 2007, ECOOP.

[8]  John A. Clark,et al.  Automated test‐data generation for exception conditions , 2000, Softw. Pract. Exp..