Skip to content

Latest commit

 

History

History
77 lines (65 loc) · 2.08 KB

README.md

File metadata and controls

77 lines (65 loc) · 2.08 KB

jLoad

Load testing framework written in Java

Test your application (or library) with only one annotation!
To use the framework, You just need to:

  • Create test class with *LTCase suffix
  • Add @LoadTest annotaion to your test method
  • Add jload library and jload-maven-plugin to your Maven project and execute: mvn clean package jload:test

Usage example:

public class AppLTCase {
    
    private App app = new App();
    
    @LoadTest(iterationCount = 10, threadCount = 3)
    public void testOperation1Performance() {
        app.executeOperation1();
    }
        
    @LoadTest(iterationCount = 10, threadCount = 3, timeout = 5000L)
    public void testOperation2Performance() {
        app.executeOperation2();
    }
}

Dependency declaration:

<repositories>
    <repository>
        <id>dreambrother-mvn-repo</id>
        <url>https://raw.github.com/dreambrother/dreambrother-mvn-repo/master/releases</url>
    </repository>
</repositories>

<pluginRepositories>
    <pluginRepository>
        <id>dreambrother-mvn-repo</id>
        <url>https://raw.github.com/dreambrother/dreambrother-mvn-repo/master/releases</url>
    </pluginRepository>
</pluginRepositories>

<dependencies>
    <dependency>
        <groupId>com.github.dreambrother</groupId>
        <artifactId>jload</artifactId>
        <version>1.0</version>
        <scope>test</scope>
    </dependency>
</dependencies>

<build>
    <plugin>
        <groupId>com.github.dreambrother</groupId>
        <artifactId>jload-maven-plugin</artifactId>
        <version>1.0</version>
    </plugin>
</build>

Output example:

Load tests execution result: 
com.github.dreambrother.jload.TestLTCase.loadTest1
Iterations: 10, execution time: 1003 ms
Operations/sec: 9.97009
Average iteration time: 100.300003 ms.

com.github.dreambrother.jload.TestLTCase.loadTest2
Iterations: 10, execution time: 3003 ms
Operations/sec: 3.3300033
Average iteration time: 300.299988 ms.

License: Apache License, Version 2.0