Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions jmeter-java-dsl-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@
<artifactId>jmeter-java-dsl-websocket</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>us.abstracta.jmeter</groupId>
<artifactId>jmeter-java-dsl-http2</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
Expand Down Expand Up @@ -180,6 +185,7 @@
<include>org.seleniumhq.selenium:*</include>
<include>com.google.guava:guava</include>
<include>com.blazemeter:jmeter-bzm-correlation-recorder</include>
<include>com.blazemeter:jmeter-bzm-http2</include>
<include>com.fasterxml.jackson.core:jackson-annotations</include>
<include>org.apache.commons:commons-text</include>
<include>dev.failsafe:failsafe</include>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import us.abstracta.jmeter.javadsl.datadog.DatadogBackendListener;
import us.abstracta.jmeter.javadsl.elasticsearch.listener.ElasticsearchBackendListener;
import us.abstracta.jmeter.javadsl.graphql.DslGraphqlSampler;
import us.abstracta.jmeter.javadsl.http2.Http2JmeterDsl;
import us.abstracta.jmeter.javadsl.jdbc.JdbcJmeterDsl;
import us.abstracta.jmeter.javadsl.parallel.ParallelController;
import us.abstracta.jmeter.javadsl.websocket.WebsocketJMeterDsl;
Expand Down Expand Up @@ -50,6 +51,7 @@ public Integer call() throws Exception {
codeGenerator);
addBuildersFrom(DatadogBackendListener.class, "jmeter-java-dsl-datadog", codeGenerator);
addBuildersFrom(WebsocketJMeterDsl.class, "jmeter-java-dsl-websocket", codeGenerator);
addBuildersFrom(Http2JmeterDsl.class, "jmeter-java-dsl-http2", codeGenerator);
System.out.println(codeGenerator.generateCodeFromJmx(jmxFile));
return 0;
}
Expand Down
52 changes: 52 additions & 0 deletions jmeter-java-dsl-http2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# jmeter-java-dsl-http2

Module for [BlazeMeter HTTP plugin](https://github.com/Blazemeter/jmeter-http2-plugin) support (HTTP/1.1, HTTP/2, HTTP/3).

## Requirements

- Java 17+ at runtime (required by the BlazeMeter HTTP plugin)
- BlazeMeter HTTP plugin JAR on the classpath

## Plugin dependency setup

Version `3.2.0` of `com.blazemeter:jmeter-bzm-http2` is not published on Maven Central. Install it locally before building:

```bash
curl -L -o jmeter-bzm-http2-3.2.0.jar \
https://github.com/Blazemeter/jmeter-http2-plugin/releases/download/v3.2.0/jmeter-bzm-http2-3.2.0.jar

mvn install:install-file \
-Dfile=jmeter-bzm-http2-3.2.0.jar \
-DgroupId=com.blazemeter \
-DartifactId=jmeter-bzm-http2 \
-Dversion=3.2.0 \
-Dpackaging=jar
```

## Usage

```java
import static us.abstracta.jmeter.javadsl.JmeterDsl.*;
import static us.abstracta.jmeter.javadsl.http2.Http2JmeterDsl.*;

testPlan(
threadGroup(1, 1,
http2Sampler("https://example.com")
.http2Only(),
httpAsyncController(
http2Sampler("https://api.example.com/a"),
http2Sampler("https://api.example.com/b")
)
)
).run();
```

## Maven dependency

```xml
<dependency>
<groupId>us.abstracta.jmeter</groupId>
<artifactId>jmeter-java-dsl-http2</artifactId>
<version>2.3-SNAPSHOT</version>
</dependency>
```
50 changes: 50 additions & 0 deletions jmeter-java-dsl-http2/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>us.abstracta.jmeter</groupId>
<artifactId>jmeter-java-dsl-parent</artifactId>
<version>2.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>jmeter-java-dsl-http2</artifactId>
<name>${project.artifactId}</name>
<description>Module which includes BlazeMeter HTTP plugin for HTTP/2 and HTTP/3 support.</description>

<properties>
<blazemeter-http2.version>3.2.0</blazemeter-http2.version>
<!-- BlazeMeter HTTP plugin requires Java 17+ -->
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>

<dependencies>
<dependency>
<groupId>us.abstracta.jmeter</groupId>
<artifactId>jmeter-java-dsl</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.blazemeter</groupId>
<artifactId>jmeter-bzm-http2</artifactId>
<version>${blazemeter-http2.version}</version>
</dependency>
<dependency>
<groupId>us.abstracta.jmeter</groupId>
<artifactId>jmeter-java-dsl</artifactId>
<type>test-jar</type>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Loading