ContiPerf iconContiPerf 2.3.0

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 {

      @Rule
      public ContiPerfRule i = new ContiPerfRule();

      @Test
      @PerfTest(invocations = 5)
      @Required(max = 1200, average = 250)
      public void test1() throws Exception {
          Thread.sleep(200);
      }

  }


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, 6:37 GMT
price:
FREE!
developed by:
Volker Bergmann
license type:
The Apache License 2.0 
category:
ROOT \ Programming \ Quality Assurance and Testing

FREE!

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

1 Screenshot
ContiPerf
What's New in This Release:
  • The invocation characteristics (thread count, warm up, ramp up) are now added to the generated HTML report.
read full changelog

Add your review!

SUBMIT