Skip to content

Commit

Permalink
Use latest selenium version in recorder to avoid issues with latest c…
Browse files Browse the repository at this point in the history
…hrome versions

This change requires changing the required jvm for recorder & jmx2dsl
  • Loading branch information
rabelenda-abstracta committed Mar 13, 2024
1 parent 48d8572 commit 8a8eb30
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
java-version: 11
cache: maven
- uses: browser-actions/setup-chrome@v1
- name: Run maven tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
java-version: 11
cache: maven
- uses: actions/setup-node@v3
with:
Expand Down
6 changes: 6 additions & 0 deletions docs/guide/jmx2dsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ public class PerformanceTest {
}
```

::: warning
Unlike the rest of JMeter DSL which is compiled with Java 8, `jmdsl.jar` and `us.abstracta.jmeter:jmeter-java-dsl-cli` are compiled with Java 11 due to some dependencies requirement (latest Selenium drivers mainly).

So, to run above commands, you will need Java 11 or newer.
:::

::: tip
Review and try generated code before executing it as is. I.e: tune thread groups and iterations to 1 to give it a try.
:::
Expand Down
6 changes: 6 additions & 0 deletions docs/guide/recorder/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ Use `java -jar jmdsl.jar help recorder` to see the list of options to customize
In general use `---url-includes` to ignore URLs that are not relevant to the performance test.
:::

::: warning
Unlike the rest of JMeter DSL, which is compiled with Java 8, `jmdsl.jar` and `us.abstracta.jmeter:jmeter-java-dsl-cli` are compiled with Java 11 due to some dependencies requirement (latest Selenium drivers mainly).

So, to run above commands, you will need Java 11 or newer.
:::

### Correlations

To avoid fragile test plans with fixed values in request parameters, the DSL recorder, through the usage of the [JMeter Correlation Recorder Plugin](https://github.com/Blazemeter/CorrelationRecorder), allows you to define correlation rules.
Expand Down
3 changes: 3 additions & 0 deletions jmeter-java-dsl-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
<properties>
<picocli.version>4.7.1</picocli.version>
<log4j.version>2.19.0</log4j.version>
<!-- Using java 11 since last version of selenium driver with java 8 does not have support for latest version of chrome driver. -->
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>

<dependencies>
Expand Down
6 changes: 6 additions & 0 deletions jmeter-java-dsl-recorder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
projects (ej: jmeter-java-dsl-cli)
</description>

<properties>
<!-- Using java 11 since last version of selenium driver with java 8 does not have support for latest version of chrome driver. -->
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>

<dependencies>
<dependency>
<groupId>com.blazemeter</groupId>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@
<junit-platform.version>1.9.1</junit-platform.version>
<assertj-core.version>3.23.1</assertj-core.version>
<jackson.version>2.14.2</jackson.version>
<!-- This is the last version compatible with java 8. 4.14 requires java 11. -->
<selenium.version>4.13.0</selenium.version>
<selenium.version>4.18.0</selenium.version>
<!-- same version as JMeter dependency -->
<slf4j.version>1.7.36</slf4j.version>
<retrofit.version>2.9.0</retrofit.version>
Expand Down Expand Up @@ -174,6 +173,7 @@
<version>3.11.0</version>
<configuration>
<compilerArgs>
<!-- this is to preserve parameters names, mainly for bridge service reflection logic -->
<arg>-parameters</arg>
</compilerArgs>
</configuration>
Expand Down

0 comments on commit 8a8eb30

Please sign in to comment.