Skip to content

Load Testing Blog

Postman Collection to JMeter

In this blog post we are going to look at how we take a postman request or collection and translate these into JMeter tests. When web services are being build it is common for Postman to be used to test the endpoints. This is done by:

  • Development teams
  • Wider Quality Assurance community
  • Business users
  • Product owners

the list goes on.

What naturally happens during programmes where web services are part of the design is that postman requests and collections are built and grow to support all manner of requirements. Using these collections to quickly build your performance tests can save you a significant amount of time and effort when it comes to understanding the web service you are testing along with the payload that the web service expects.

You will find that in some cases you can inherit a fully functioning set of web service requests that support all your requirements from a performance testing perspective.

Build your own JMeter Docker Image and execute your Performance Test

If you'd like to run load tests in a simple way, and possibly share them, while benefiting from a simplified configuration, with a focus on writing your test plan, and its test typology, this article is for you!

Docker offers virtualization services that simplify the replication of working environments.

Furthermore, each virtualized service is isolated from unrelated services on other containers or the host machine, ensuring portability across host machines and the network.

Using JMeter within a Docker container offers several advantages :

Portability :

Docker enables the creation of lightweight and portable containers that can run on any Docker-compatible system, whether it's Linux, macOS, or Windows. This simplifies the deployment and management of JMeter, avoiding compatibility issues related to different system configurations.

Isolation :

Docker containers provide an isolated environment for running applications, meaning JMeter's dependencies and runtime environment are encapsulated within the container. This reduces potential conflicts with other applications or system components.

Ease of deployment :

With Docker, distributing and deploying JMeter across multiple machines or environments is straightforward.

You can create a Docker image containing JMeter and distribute it to your team or various test environments, streamlining the deployment process.

Version management :

By using Docker, you can version your Docker images containing JMeter, facilitating the management of different versions of JMeter used in your tests. You can also share these images via public or private Docker registries

JMeter JMesPath Extractor

Extracting values from server responses is a common operation in scripting scenarios for performance testing. In most cases it is a mandatory step in order to reproduce realistic traffic using dynamic values generated on server side like sessionIds or Tokens.

The most known way to extract values is using regular expression. While regular expressions are efficient for raw text-based responses, they are less efficient for structured responses like XML or JSON. JMeter provides specific extractors for those kind of responses. For JSON structures, JMeter implements 2 ways for handling them:

Playwright vs JMeter

In our quest to provide a comprehensive suite of tools for our load tester community, we, at OctoPerf, developed a full integration with Playwright. Playwright is an end-to-end testing library that has the ability to automate real browser actions. Which means that you will be able to do exactly that on OctoPerf, on top of all the advanced performance monitoring and report features that it already has.

In this article we will start with introducing browser based testing to better understand the advantages it can provide to a load tester. We will then compare a load testing campaign made with browser based and one with protocol based Virtual Users (VUs) to fully understand the differences.

JMeter Throughput Controller

In this blog post we are going to be looking at the Throughput Controller. Its name is a little misleading as it does not control the throughput in terms of managing load across the duration of a test, this is handled by elements such as the Constant Throughput Timer. The Throughput Controller can support you in building quite complex scenarios especially when coupled with other Controllers and we will explore this in this blog post as well as looking at how this Controller can provide benefit in real-world performance testing scenarios. OctoPerf support this behaviour natively on their SAAS platform through the use of the Flow Control Action that can support the same patterns of behaviour that we will discuss in this blog post.

Basic example

Let’s create a JMeter test to demonstrate how this Throughput Controller Works. We will use a set of Dummy Samplers to achieve this. If we create this test where we have 2 Samplers:

  • Sampler A
  • Sampler B

With Sampler B being a child of a Throughput Controller.

initial-basic-test.png

We can see that we have a single Thread with the Loop Count set to 10.