2.3.0 The Apache License 2.0    
  not rated
A lightweight testing utility





ContiPerf is a lightweight testing tool that enables the user to easily leverage JUnit 4 test cases as performance tests e.g. for continuous performance testing. It is inspired by JUnit 4's easy test configuration with annotations and by JUnitPerf's idea of wrapping Unit tests for performance testing, but more powerful and easier to use:

* Using Java annotations for defining test execution characterisitics and performance requirements
* You can mark a test to run a certain number of times or to be repeatedly executed for a certain amount of time
* Performance requirements can be maximum, average, medium or any percentile exectution time
* Perfect control and readability of performance requirements
* You can run tests in two different modes, using them as simple unit tests or performance tests
* Easy integration with Eclipse and Maven
* Export of execution summary to a CSV file
* Small library without external dependencies (only JUnit)
* Easy extension with custom statistics evaluation and tracking mechanisms

Here is a very simple test:

  import org.junit.*;
  import org.databene.contiperf.*;

  public class SmokeTest {

      public ContiPerfRule i = new ContiPerfRule();

      @PerfTest(invocations = 5)
      @Required(max = 1200, average = 250)
      public void test1() throws Exception {


Defining an attribute of type ContiPerfRule with the annotation @Rule activates ContiPerf. You can then choose from a different settings for specifying test execution (@PerfTest) and performance requirements (@Required). In the example the test is defined to run 5 times and to require a maximum execution time of 1.2 seconds and and average below or equals 250 milliseconds.

As of ContiPerf 1.03, you can define concurrency tests as well, specifying the number of threads that execute the test methods concurrently.

    @PerfTest(invocations = 10, threads = 3)
    public void test1() throws Exception {
Last updated on November 23rd, 2012

0 User reviews so far.