Rainfall is an extensible java framework to implement custom DSL based stress and performance tests in your application.
It has a customisable fluent interface that lets you implement your own DSL when writing tests scenarios, and define your own tests actions and metrics. Rainfall is open to extensions, three of which are currently in progress,
- Rainfall web is a Yet Another Web Application performance testing library
- Rainfall JCache is a library to test the performance of JSR107 caches solutions
- Rainfall Ehcache is a library to test the performance of Ehcache 2 and 3
![Build Status](https://rainfall.ci.cloudbees.com/buildStatus/icon?job=Rainfall ehcache)
Rainfall-core is the core library containing the key elements of the framework. When writing your framework implementation, you must include this library as a dependency.
Rainfall-web is the Web Application performance testing implementation.
Rainfall-jcache is the JSR107 caches performance testing implementation.
Rainfall-ehcache is the Ehcache 2.x/3.x performance testing implementation.
Performance tests are written in java
ObjectGenerator<Long> keyGenerator = new LongGenerator(); // (1)
ObjectGenerator<byte[]> valueGenerator = ByteArrayGenerator.fixedLength(1000); // (2)
StatisticsPeekHolder finalStats = Runner.setUp( // (3)
Scenario.scenario("Test phase").exec( // (4)
put(Long.class, byte[].class) // (5)
.using(keyGenerator, valueGenerator) // (6)
.atRandom(GAUSSIAN, 0, 100000, 5000), // (7)
get(Long.class, byte[].class).withWeight(0.80) //(8)
.using(keyGenerator, valueGenerator)
.atRandom(GAUSSIAN, 0, 100000, 5000)
))
.executed(during(1, minutes))
.config(concurrency,
ReportingConfig.report(EhcacheResult.class).log(text(), html()).summary(text()))
.config(cacheConfig(Long.class, byte[].class)
.caches(one, two, three, four).bulkBatchSize(10))
.start();
(1) A class to generate Long values
(2) A class to generate byte arrays of 1000 bytes
(3) Test runner, returns a StatisticsPeekHolder that holds the final stats summary
(4) a Scenario is a list of operations that will be executed
(5) an operation (put) that will put Long objects as keys and byte[] objects as values.
(6) use a Long generator as a key generator and a byte array generator for values
(7) The distribution of keys will be gaussian, to simulate a real-life scenario where
only a limited set of keys are more often accessed
(8) Another operation : get()
See the Wiki to list all operations and parameters.
mvn clean install
<dependencies>
<dependency>
<groupId>io.rainfall</groupId>
<artifactId>rainfall-ehcache</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>io.rainfall</groupId>
<artifactId>rainfall-core</artifactId>
<version>1.0.4</version>
</dependency>
</dependencies>
Cloudbees for cloud-based continuous delivery
and of course Github for hosting this project.