Object-oriented (OO) programming offers useful and desirable characteristics in the resulting code. These OO characteristics, however, demand an effective testing method. Adaptive random testing (ART) serves as an effective testing technique where test cases are distributed uniformly according to a proper metric for difference (distance) between test cases. Recently proposed object and method invocation sequence similarity (OMISS) distance metric was incorporated into a new ART algorithm (OMISS-ART) for testing OO software. Unfortunately, OMISS-ART’s high effectiveness in finding faults comes at significantly higher computational overheads. To alleviate the problem, we present in this paper a linear-time ART algorithm called L′OP-ART (Linear-time Object-oriented Program testing by ART) based on a lightweight OMISS metric. L′OP-ART designs specific data structures that store information about executed test cases, thus, the differences between candidates and executed test cases can be obtained with reduced overheads. Empirical studies show that L′OP-ART detects failures more effectively than random testing (RT), and has comparable fault-detection effectiveness to other ART algorithms for OO testing (according to the F-measure, or the expected number of test case executions required to find a failure). Furthermore, the test case generation overhead of L′OP-ART is low, close to that of RT.
Read full abstract