Automated Generation of Test Programs from Closed Specifications of Classes and Test Cases

  • Authors:
  • Wee Kheng Leow;Siau Cheng Khoo;Yi Sun

  • Affiliations:
  • National University of Singapore;National University of Singapore;National University of Singapore

  • Venue:
  • Proceedings of the 26th International Conference on Software Engineering
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

Most research on automated specification-based softwaretesting has focused on the automated generation oftest cases. Before a software system can be tested, it must beset up according to the input requirements of the test cases.This setup process is usually performed manually, especiallywhen testing complex data structures and databases.After the system is properly set up, a test execution tool runsthe system according to the test cases and pre-recorded testscripts to obtain the outputs, which are evaluated by a testevaluation tool.This paper complements the current research on automatedspecification-based testing by proposing a schemethat combines the setup process, test execution, and test validationinto a single test program for testing the behavior ofobject-oriented classes. The test program can be generatedautomatically given the the desired test cases and closedspecifications of the classes. With closed specifications, everyclass method is defined in terms of other methods whichare, in turn, defined in their own class specifications. Thecore of the test program generator is a partial-order plannerwhich plans the sequence of instructions required in thetest program. The planner is, in turn, implemented as a tree-searchalgorithm. It makes function calls to the Omega Calculatorlibrary, which solves the constraints given in thetest cases. A first-cut implementation of the planner hasbeen completed, which is able to handle simple arithmeticsand existential quantifications in the class specifications. Asoundness and completeness proof sketch of the planner isalso provided in this paper.