Using the DejaVu Regression Test Selector

The first step in using DejaVu is to create a test history file for the version of the program against which test selection will be performed. This is accomplished by performing the following steps:

  1. Use the CFG builder to create control flow graphs for every class of interest using a unique database tag (the resulting files will be placed in the database directory and will be available to other Σοφία tools).
  2. Instrument the classes for basic block event dispatch, and collect trace files by executing the program using the basic block tracer (BBTracer).
  3. Use the test history builder to construct the test history file.

Next you need to create control flow graphs for the new version of the program for which you want to select tests. Run the control flow graph on the same set of classes in the new version, but using a different database tag. You are now ready to invoke DejaVu as follows:

java sofya.apps.DejaVu <old_prog_file> <new_prog_file> <test_history_file> <-t s|l|t> <-tag1 old_tag> <-tag2 new_tag>

DejaVu will then display the selected tests for the new version, in the format specified using the -t parameter. Specifying 's' will cause DejaVu to display statistical information about the selected tests. A value of 'l' will result in a plain list of selected tests, suitable for supplying as input to another tool. The final value 't' is the most useful for viewing as it will display a tabular view correlating each method to the tests selected due to changes in that method. A data file is also produced in the database directory, using the tag for the new version of the program, that contains the test selection results. The TestSelectionViewer can be used to view the selected tests at a later time without having to rerun DejaVu.

The 'prog' parameters are specified in the same manner as with the test history builder. Their corresponding prog.lst files should be in the respective tag subdirectories in the Σοφία database.

 


Author: Alex Kinneer © 2006 University of Nebraska - Lincoln.

Page last updated by Wayne Motycka: 08/27/2018