Blog

JMeter DSL, an Innovative Tool for Performance Testing

What is JMeter DSL, what improvements does it bring with respect to JMeter, what are the new functionalities it provides? This open source contribution developed by Abstracta is already used by users from different parts of the world, such as the United States, India, Russia, Ukraine and China, and it is being downloaded more and more every day. Find out all about it in this article. 

JMeter DSL Code

By Roger Abelenda

I recently published a note in which I talked about the importance of evaluating the performance of any application, without exception and under different conditions. The objective is clear and concrete: to avoid crashes, ensure the correct user experience and improve the quality of the software. 

Undoubtedly, a very useful tool to achieve this goal is JMeter DSL, an innovation we made at Abstracta with respect to JMeter, with some improvements and new features.

First of all, I will explain what JMeter is at a general level, and then I will go into detail about the new possibilities that we now have with JMeter DSL, to show the full potential of this promising innovation that we have today. 

JMeter

JMeter is a tool that allows you to design and run performance tests through a graphical interface, without the need for programming knowledge. This feature makes it very attractive to many users, although it also has some associated drawbacks.

As we start to design complex test plans, the complexity of managing them with the provided interface, working collaboratively on the test plan, visualizing the entire test plan quickly and easily, and achieving design speed, among others, becomes noticeable. Additionally, for development teams, it is tedious to have to interact with an interface outside the development environment where they are. 

Integrating JMeter into a continuous integration environment requires additional steps that are not usually required with other types of tests. Fortunately, many of these problems are easily solved by other solutions such as Gatling or K6. How? By using code, which has properties and tools developed that help in all of the above aspects. 

However, these tools have some limitations: they require changing language or learning programming; they have some paid functionalities; and they do not have support for some functionalities that JMeter does provide. In addition, there is not as much knowledge and documentation about them.

JMeter provides an API that allows you to design and run tests from code. But this API requires a lot of code to design and run simple tests. In addition, advanced knowledge of JMeter and its code is required. In other words, this API is intended for internal application use and not to facilitate the design and execution of tests from code.

What is JMeter DSL and What is its Contribution to this Problem?

A man typing code on  his laptop

JMeter DSL is a library developed by Abstracta. It is a layer that simplifies the use of JMeter through code, also adding some functionalities. Examples include running tests on cloud services and evaluating test execution results.

To illustrate, we can think of JMeter DSL as an adapter or an extension. In relation to audio equipment, for example, JMeter DSL would be the remote control. In other words, the tool proposes a new way of using the same thing (JMeter), which for some people may become more practical. This is because now they have the possibility to obtain benefits that they could not with the interface they had until now, or it was more difficult for them.

JMeter DSL allows JMeter to be used from code in a simple way, without the need to learn a new language or incorporate new tools. In this way, it expands the number of possible users able to take advantage of JMeter; it allows faster and simpler testing; and it contributes to the development of quality software.

Specifically, JMeter DSL enables continuous performance testing to be integrated into existing development pipelines more easily, promoting shift left testing. In addition, it simplifies the application of engineering and software development skills to the development and maintenance of JMeter performance tests.

How does JMeter DSL Work?

Click here to access our JMeter DSL User Guide, elaborated by Abstracta.

JMeter DSL provides a set of methods that can be easily put together, as if you were putting together lego pieces, to build a JMeter test plan. 

With just one dependency and one import, we have available the main components that can be combined. At the same time, with the help of an IDE, it allows quick creation and execution of a performance test plan, with embedded documentation, auto-completion, and other functionalities provided by IDES. 

The methods provided by JMeter DSL simply return objects that allow building the test plan in a simple and fast way. And run it on a JMeter embedded engine or a cloud service when needed, such as BlazeMeter or OctoPerf. 

Tests can be easily executed with JUnit or other test execution frameworks, making them easily integrated into existing development pipelines. 

There is no need to install JMeter or configure anything additional, beyond the standard tools in a Java development environment.

Save Time with JMeter DSL

Roger Abelenda
Chief Technology Officer

Time is undoubtedly one of our most valuable resources, and having tools that allow us to optimize our tasks is in itself a very important link in our daily work. JMeter DSL allows us to save time by promoting shift left testing and doing the tests as soon as possible. 

Creating and maintaining performance tests with JMeter DSL is much faster than doing it with JMeter’s graphical interface. Not only because it is easier to read and understand all the components in a plan, but also because it promotes greater reuse. And reduces documentation review time, with online documentation. 

On the other hand, in general, thanks to the autocomplete of the IDEs and the ease of handling text, it is much faster to create a test plan with JMeter DSL than to go through JMeter’s graphical interface and fill in the fields.

Do you have any suggestions regarding JMeter DSL? Your feedback is more than valuable to our team. I share here our GitHub repository so you can request what you consider necessary or useful. You can also rate with stars, to which we pay special attention.

At Abstracta, we are committed to implementing features that demonstrate a need from users and based on these requests we base a lot of our releases. 

We have many ideas in our backlog of things that we think could be interesting to implement but we prefer, in most cases, to wait for a user to report the need, avoiding overloading the tool with features that may not be used as much. 

This allows us to prioritize the work and effort invested; to document the raison d’être of each component, and involve the community in the development of the tool. 

Go to our User Guide and clear all your doubts about JMeter DSL.

Follow us on Linkedin, Facebook, and Twitter, to be part of our community!

295 / 462

Leave a Reply

Required fields are marked