coffee4j

Combinatorial Test and Fault Characterization Framework

coffee4j is a Java-based framework for combinatorial test input generation and fault characterization. It is based on a fast implementation of the well-known IPOG algorithm and supports constraint handling, robustness testing and fault localization. A JUnit 5 extension seamlessly integrates combinatorial test input generation, fault characterization and automated test execution.

Quick Start

To quickly start, use the following Maven dependency in your project.

<dependency>
  <groupId>de.rwth.swc.coffee4j</groupId>
  <artifactId>coffee4j-junit-jupiter</artifactId>
  <version>1.0.5</version>
  <scope>test</scope>
</dependency>

Create a new JUnit 5 test as follows. The annotations on testGreetings indicate that it is a combinatorial test method, i.e. a test method which is executed several times with different values for its parameters. The static method model describes the input parameter model and the testing strength. Based on that model, test inputs are generated and the testGreetings method is executed for each generated test input.

class GreetingsTest {

  private static InputParameterModel model() {
    return inputParameterModel("example-model")
      .strength(2)
      .parameters(
        parameter("Title").values("Mr", "Mrs"),
        parameter("FirstName").values("John", "Jane"),
        parameter("LastName").values("Doo", "Foo")
    ).build();
  }

  @CombinatorialTest
  @ModelFromMethod("model")
  void testGreetings(String title, String firstName, String lastName) {
    System.out.println("Hello " + title + " " + firstName + " " + lastName);
  }
}

For more information, please refer to the Getting Started section and the Example project.

 
The website is build with Jekyll using the Hydeout theme. Icon designed by Freepik from Flaticon. Disclaimer.