hero

Simple JMeter performance tests API

User Guide →

💙 Git, IDE & Programmers Friendly

Simple way of defining performance tests which takes advantage of IDEs autocompletion and inline documentation.

💪 JMeter ecosystem & community

Use the most popular performance tool and take advantage of wide support of protocols and tools.

😎 Built-in features & extensibility

Built-in additional features which ease usage (like jmx2dsl) and CI/CD pipelines integration.

# Example

Add dependency to your project:

<dependency>
  <groupId>us.abstracta.jmeter</groupId>
  <artifactId>jmeter-java-dsl</artifactId>
  <version>0.56</version>
  <scope>test</scope>
</dependency>
1
2
3
4
5
6

Create performance test:

import static org.assertj.core.api.Assertions.assertThat;
import static us.abstracta.jmeter.javadsl.JmeterDsl.*;

import java.io.IOException;
import java.time.Duration;
import org.junit.jupiter.api.Test;
import us.abstracta.jmeter.javadsl.core.TestPlanStats;

public class PerformanceTest {

  @Test
  public void testPerformance() throws IOException {
    TestPlanStats stats = testPlan(
            threadGroup(2, 10,
                    httpSampler("http://my.service")
            )
    ).run();
    assertThat(stats.overall().sampleTimePercentile99()).isLessThan(Duration.ofSeconds(5));
  }

}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

Here (opens new window) is a sample project in case you want to start one from scratch.