Agile Testing of Exceptional Behavior

The lack of testing and a priori design of the exceptional behavior are causing many of the problems found in the use of exception handling. As a consequence, exceptions flow in unforeseen ways during the execution of a software system, having a negative impact on reliability. This paper presents an agile approach to test the exceptional behavior of a system. It supports developers in checking whether exceptions, at runtime, travel through the expected paths. It is agile because tests are written without the need for extra documentation and are, themselves, considered live documentation. We have evaluated our approach by applying it to different versions of two production quality Java open source applications (i.e., aTunes and JEdit). Using the proposed approach, we could find twelve bugs --- eight of them previously unknown by the open source projects. In addition, from the viewpoint of automated tests as documentation artifacts, the proposed approach pointed out several differences between versions of the two target systems. We have implemented the proposed approach as an extension of the JUnit framework.

[1]  Kent L. Beck,et al.  Extreme programming explained - embrace change , 1990 .

[2]  Cecília M. F. Rubira,et al.  A comparative study of exception handling mechanisms for building dependable object-oriented software , 2001, J. Syst. Softw..

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

[4]  Cecilia Mary Fischer Rubira,et al.  Exception handling in the development of dependable component-based systems , 2005 .

[5]  Carlos José Pereira de Lucena,et al.  Assessing the Impact of Aspects on Exception Flows: An Exploratory Study , 2008, ECOOP.

[6]  Kent Beck,et al.  Extreme Programming Explained: Embrace Change (2nd Edition) , 2004 .

[7]  Martin P. Robillard,et al.  Static analysis to support the evolution of exception structure in object-oriented systems , 2003, TSEM.

[8]  Hina Shah,et al.  Visualization of exception handling constructs to support program understanding , 2008, SoftVis '08.

[9]  Cecília M. F. Rubira,et al.  Exceptions and aspects: the devil is in the details , 2006, SIGSOFT '06/FSE-14.

[10]  Theme Feature Toward Systematic Design of Fault- Tolerant Systems , 1997 .

[11]  Alessandro Orso,et al.  Automated Support for Development, Maintenance, and Testing in the Presence of Implicit Control Flow , 2004, ICSE.

[12]  Jeffrey S. Foster,et al.  Tracking down Exceptions in Standard ML Programs , 1998 .

[13]  Kwangkeun Yi,et al.  Interprocedural exception analysis for Java , 2001, SAC.

[14]  Ivan Kiselev,et al.  Aspect-Oriented Programming with AspectJ , 2002 .

[15]  Flaviu Cristian,et al.  Exception Handling and Tolerance of Software Faults , 1995 .

[16]  Daniela Gotseva,et al.  Aspect-oriented programming with AspectJ , 2012 .

[17]  Flaviu Cristian,et al.  Exception Handling and Software Fault Tolerance , 1982, IEEE Transactions on Computers.

[18]  Nélio Cacho,et al.  eFlowMining: An Exception-Flow Analysis Tool for .NET Applications , 2011, 2011 Fifth Latin-American Symposium on Dependable Computing Workshops.

[19]  Saurabh Sinha,et al.  Criteria for testing exception-handling constructs in Java programs , 1999, Proceedings IEEE International Conference on Software Maintenance - 1999 (ICSM'99). 'Software Maintenance for Business Change' (Cat. No.99CB36360).

[20]  Alessandro Orso,et al.  Automated support for development, maintenance, and testing in the presence of implicit flow control , 2004, Proceedings. 26th International Conference on Software Engineering.

[21]  Vinod Kumar,et al.  Identifying some important success factors in adopting agile software development practices , 2009, J. Syst. Softw..

[22]  Roberta Coelho,et al.  Preserving the Exception Handling Design Rules in Software Product Line Context: A Practical Approach , 2011, 2011 Fifth Latin-American Symposium on Dependable Computing Workshops.

[23]  Hina Shah,et al.  Why do developers neglect exception handling? , 2008, WEH '08.

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

[25]  MisraSubhas Chandra,et al.  Identifying some important success factors in adopting agile software development practices , 2009 .

[26]  Cecília M. F. Rubira,et al.  Exception handling in the development of dependable component‐based systems , 2005, Softw. Pract. Exp..

[27]  Jörg Kienzle,et al.  On exceptions and the software development life cycle , 2008, WEH '08.

[28]  Chen Fu,et al.  Exception-Chain Analysis: Revealing Exception Handling Architecture in Java Server Applications , 2007, 29th International Conference on Software Engineering (ICSE'07).

[29]  Jörg Kienzle,et al.  Exception-Aware Requirements Elicitation with Use Cases , 2006, Advanced Topics in Exception Handling Techniques.

[30]  David Lorge Parnas,et al.  Response to undesired events in software systems , 1976, ICSE '76.