You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/index.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,11 +5,11 @@ actionText: User Guide →
5
5
actionLink: /guide/
6
6
features:
7
7
- title: 💙 Git, IDE & Programmers Friendly
8
-
details: Simple way of defining performance tests which takes advantage of IDEs autocompletion and inline documentation.
8
+
details: Simple way of defining performance tests that takes advantage of IDEs autocompletion and inline documentation.
9
9
- title: 💪 JMeter ecosystem & community
10
-
details: Use the most popular performance tool and take advantage of wide support of protocols and tools.
10
+
details: Use the most popular performance tool and take advantage of the wide support of protocols and tools.
11
11
- title: 😎 Built-in features & extensibility
12
-
details: Built-in additional features which ease usage (like <a href="guide/#dsl-code-generation-from-jmx-file">jmx2dsl</a>) and CI/CD pipelines integration.
12
+
details: Built-in additional features which ease usage (like <a href="guide/#dsl-code-generation-from-jmx-file">jmx2dsl</a>) and CI/CD pipelines integration.
Copy file name to clipboardExpand all lines: docs/motivation/README.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,13 +7,15 @@ sidebar: auto
7
7
8
8
There are many tools to script performance/load tests, being [JMeter](http://jmeter.apache.org/) and [Gatling](https://gatling.io/) the most popular ones.
9
9
10
+
Here we explore some alternatives, their pros & cons, and the main motivations behind the development of jmeter-java-dsl.
11
+
10
12
## Alternatives analysis
11
13
12
14
### JMeter
13
15
14
16
JMeter is great for people with no programming knowledge since it provides a graphical interface to create test plans and run them. Additionally, it is the most popular tool (with a lot of supporting tools built on it) and has a big amount of supported protocols and plugins making it very versatile.
15
17
16
-
But, JMeter has some downsides as well: sometimes might be slow to create test plans in JMeter GUI and you can't get the full picture of the test plan unless you dig in every tree node to check its properties. Furthermore, it doesn't provide a simple programmerfriendly API (you can check [here](https://www.blazemeter.com/blog/5-ways-launch-jmeter-test-without-using-jmeter-gui/) for an example on how to run JMeter programmatically without jmeter-java-dsl), nor a Gitfriendly format (too verbose and hard to review). For example, for this test plan:
18
+
But, JMeter has some downsides as well: sometimes it might be slow to create test plans in JMeter GUI and you can't get the full picture of the test plan unless you dig in every tree node to check its properties. Furthermore, it doesn't provide a simple programmer-friendly API (you can check [here](https://www.blazemeter.com/blog/5-ways-launch-jmeter-test-without-using-jmeter-gui/) for an example of how to run JMeter programmatically without jmeter-java-dsl), nor a Git-friendly format (too verbose and hard to review). For example, for this test plan:
@@ -48,24 +50,24 @@ In JMeter, you would need a JMX file like [this](../../docs/motivation/sample.jm
48
50
49
51
### Gatling
50
52
51
-
Gatling does provide a simple API and a Gitfriendly format, but requires scala knowledge and environment [[1](#gatling-java)]. Additionally, it doesn't provide as rich environment as JMeter (protocol support, plugins, tools) and requires learning a new framework for testing (if you already use JMeter, which is the most popular tool).
53
+
Gatling does provide a simple API and Git-friendly format but requires scala knowledge and environment [[1](#gatling-java)]. Additionally, it doesn't provide as a rich environment as JMeter (protocol support, plugins, tools) and requires learning a new framework for testing (if you already use JMeter, which is the most popular tool).
52
54
53
55
### Taurus
54
56
55
-
[Taurus](https://gettaurus.org/) is another open-source tool that allows specifying tests in a Gitfriendly yaml syntax, and provides additional features like pass/fail criteria and easier CI/CD integration. But, this tool requires a python environment, in addition to the java environment. Additionally, there is no built-in GUI or IDE auto-completion support, which makes it harder to discover and learn the actual syntax. Finally, Taurus syntax only supports a subset of the features JMeter provides.
57
+
[Taurus](https://gettaurus.org/) is another open-source tool that allows specifying tests in a Git-friendly yaml syntax, and provides additional features like pass/fail criteria and easier CI/CD integration. But, this tool requires a python environment, in addition to the java environment. Additionally, there is no built-in GUI or IDE auto-completion support, which makes it harder to discover and learn the actual syntax. Finally, Taurus syntax only supports a subset of the features JMeter provides.
56
58
57
59
### ruby-dsl
58
60
59
-
Finally, [ruby-dsl](https://github.com/flood-io/ruby-jmeter) is also an opensource library which allows specifying and run in ruby custom dsl JMeter test plans. This is the most similar tool to jmeter-java-dsl, but it requires ruby (in addition to java environment) with the additional performance impact, does not follow same naming and structure convention as JMeter, and lacks of debugging integration with JMeter execution engine.
61
+
Finally, [ruby-dsl](https://github.com/flood-io/ruby-jmeter) is also an open-source library that allows specifying and running in ruby custom DSL JMeter test plans. This is the most similar tool to jmeter-java-dsl, but it requires ruby (in addition to the java environment) with the additional performance impact, does not follow the same naming and structure convention as JMeter, and lacks debugging integration with JMeter execution engine.
60
62
61
63
### jmeter-java-dsl
62
64
63
-
jmeter-java-dsl tries to get the best of these tools by providing a simple java API with Git friendly format to run JMeter tests, taking advantage of all JMeter benefits and knowledge also providing many of the benefits of Gatling scripting.
64
-
As shown in previous example, it can be easily executed with JUnit, modularized in code and easily integrated in any CI/CD pipeline. Additionally, it makes it easy to debug the execution of test plans with usual IDE debugger tools. Finally, as with most Java libraries, you can use it not only in a Java project, but also in projects of most JVM languages (like kotlin, scala, groovy, etc.).
65
+
jmeter-java-dsl tries to get the best of these tools by providing a simple java API with Git friendly format to run JMeter tests, taking advantage of all JMeter benefits and knowledge and also providing many of the benefits of Gatling scripting.
66
+
As shown in the previous example, it can be easily executed with JUnit, modularized in code, and easily integrated into any CI/CD pipeline. Additionally, it makes it easy to debug the execution of test plans with the usual IDE debugger tools. Finally, as with most Java libraries, you can use it not only in a Java project but also in projects of most JVM languages (like kotlin, scala, groovy, etc.).
65
67
66
68
## Comparison Table
67
69
68
-
Here is a table with summary of main pros and cons of each tool:
70
+
Here is a table with a summary of the main pros and cons of each tool:
@@ -76,7 +78,7 @@ Here is a table with summary of main pros and cons of each tool:
76
78
| jmeter-java-dsl | 👍 VCS friendly<br/>👍 IDE friendly (auto-complete and debug)<br/>👍 Natural CI/CD integration<br/>👍 Natural code modularization and reuse<br/>👍 Existing JMeter documentation<br/>👍 Easy to add support for JMeter supported protocols and new plugins<br/>👍 Could easily interact with JMX files and take advantage of JMeter ecosystem<br/>👍 All details of simple test plans at a glance<br/>👍 Simple way to do assertions on statistics | 👎 Basic Java knowledge required<br/>👎 Same resources (CPU & RAM) usage as JMeter |
77
79
78
80
::: tip Notes
79
-
1. <aname="gatling-java"></a> One year after jmeter-java-dsl release, on November 2021, Gatling released [3.7 version](https://gatling.io/2021/11/gatling-3-7-java-dsl-kotlin-and-much-more/), including a Java friendly API for existing Gatling Scala API. This greatly simplifies usage for Java users and is a great addition to Gatling.
81
+
1. <aname="gatling-java"></a> One year after jmeter-java-dsl release, on November 2021, Gatling released [3.7 version](https://gatling.io/2021/11/gatling-3-7-java-dsl-kotlin-and-much-more/), including a Java friendly API for existing Gatling Scala API. This greatly simplifies usage for Java users and is a great addition to Gatling.
80
82
81
-
As a side note, take into consideration that underlying code is still Scala and async modelbased, which makes debugging and understanding it harder for Java developers than JMeter code. Additionally, the model is still tied to `Simulator` classes and maven (gradle or sbt) plugin to be able to run the tests, compared to the simplicity and flexibility of jmeter-java-dsl tests execution.
82
-
:::
83
+
As a side note, take into consideration that the underlying code is still Scala and async model-based, which makes debugging and understanding it harder for Java developers than JMeter code. Additionally, the model is still tied to `Simulator` classes and maven (gradle or sbt) plugin to be able to run the tests, compared to the simplicity and flexibility of jmeter-java-dsl tests execution.
0 commit comments