Skip to Main Content
As UML models are widely used as design blueprints, model-based techniques can be used in test case generation. However, test cases obtained from these techniques are usually abstract test cases, represented as sequences of actions in abstract models, and heavy human efforts are needed to translate them into concrete test cases accepted by programs for execution. To reduce this effort, we present an approach to automatically generating executable test cases based on activity diagrams. It relates methods of classes in JAVA programs with activity nodes in their design models and instruments codes into JAVA programs to collect traces in execution. Regarding traces collected in execution as feedbacks, data classifiers that can predict test inputs' impact on decision nodes in activity diagrams are constructed. Those data classifiers are used to guide the creation of new test inputs that can cover untouched paths in design models. Experiments show that the approach can greatly relieve testers' burden in preparing test cases.