Class-based testing of object-oriented framework interface classes
Paul G. Sorenson, Jehad Al Dallal · 2003
An application framework provides a reusable design and implementation for a family of software systems. Frameworks are introduced to reduce the cost of a product line (i.e., family of products that share common features). Software testing is a time-consuming, costly, and ongoing activity during the application software development process. Generating reusable test cases for the framework applications at the framework development stage and using the test cases to test part of the framework application whenever the framework is used can reduce the application development time and cost considerably. This thesis focuses on testing framework applications at the class level using reusable test cases. Specifically, it addresses how to generate the class-based test cases at the framework development stage and use them effectively at the application development stage. The thesis introduces a novel technique to automate the construction of the class-based testing model using the method specifications provided in the hooks and introduces a technique called all paths-state that uses the constructed testing model to generate the class-based reusable test cases at the framework development stage. At the application development stage, the application developers may need the flexibility to ignore or modify part of the specifications used to generate the reusable class-based test cases and add new specifications not covered by the reusable test cases. The thesis shows how to deal effectively with such modifications so that testing becomes easy and straightforward in application development. The introduced techniques are evaluated using applications of four frameworks of two different types. Case studies are used to show the applicability of the introduced techniques and the effectiveness of providing the reusable test cases with the frameworks in reducing the testing cost of the framework applications. The evaluation results also establish the relation between the reusability of the test cases and the type of the framework. Finally, as part of this thesis research, a prototype tool was developed to support the generation of the class-based reusable test cases at the framework development stage. The tool also deploys, executes, and evaluates the test cases at the application development stage.