Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Suite Optimizer for Java

Optimize a set of tests by identifying combinations that simultaneously:

  • Maximize total coverage.
  • Maximize suite size.
  • Eliminate redundant tests, i.e., tests whose removal does not reduce coverage.

This optimization strategy results in minimal coverage per test, which contributes to improved test atomicity.

Coverage data is obtained using JaCoCo.

Note

This is developed as part of the Modest project in order to optimize generated test suites.
However, it is applicable to any Java project.

Usage

The optimizer takes as arguments:

  • classpaths, paths to class files or directories of the project under test.
  • --, to separate with the following.
  • execpaths, set of paths to JaCoCo execution data files (.exec), each one corresponding to the coverage of an atomic test.
java -jar suite-optimizer.jar <classpaths...> -- <execpaths...>

The output shows the optimized combinations of equal size, with each combination listed on a separate line in the standard output. Each test is identified by its index in execpaths, and the tests within a combination are separated by commas.

Note

The Atomic Coverage Analyzer can be used to generate an exec file per test method.

Build

Using Maven:

mvn clean install

The generated jar can be found in the target folder.

About

Eliminate redundant tests from a suite.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Used by

Contributors

Languages