Print Email Facebook Twitter An Approach for Search Based Testing of Null Pointer Exceptions Title An Approach for Search Based Testing of Null Pointer Exceptions Author Romano, D. Di Penta, M. Antoniol, G. Faculty Electrical Engineering, Mathematics and Computer Science Department Software Technology Date 2011-12-31 Abstract Uncaught exceptions, and in particular null pointer exceptions (NPEs), constitute a major cause of crashes for software systems. Although tools for the static identification of potential NPEs exist, there is need for proper approaches able to identify system execution scenarios causing NPEs. This paper proposes a search-based test data generation approach aimed at automatically identify NPEs. The approach consists of two steps: (i) an inter-procedural data and control flow analysis—relying on existing technology—that identifies paths between input parameters and potential NPEs, and (ii) a genetic algorithm that evolves a population of test data with the aim of covering such paths. The algorithm is able to deal with complex inputs containing arbitrary data structures. The approach has been evaluated on to test class clusters from six Java open source systems, where NPE bugs have been artificial introduced. Results show that the approach is, indeed, able to identify the NPE bugs, and it outperforms random testing. Also, we show how the approach is able to identify real NPE bugs some of which are posted in the bugtracking system of the Apache libraries. Accepted for publication in the Proceedings of the International Conference on Software Testing, Verification and Validation, 2011, IEEE CS Press. Subject Null pointer exceptionsSearch-based testing To reference this document use: http://resolver.tudelft.nl/uuid:ec41e900-db14-44eb-a0c2-fb2525573744 Publisher Delft University of Technology, Software Engineering Research Group ISSN 1872-5392 Source Technical Report Series TUD-SERG-2011-028 Part of collection Institutional Repository Document type report Rights (c) 2011 The authors. Software Engineering Research Group, Department of Software Technology, Faculty of Electrical Engineering, Mathematics and Computer Science, Delft University of Technology. Files PDF TUD-SERG-2011-028.pdf 1.38 MB Close viewer /islandora/object/uuid:ec41e900-db14-44eb-a0c2-fb2525573744/datastream/OBJ/view