Skip to content

2017

JMeter Regex Extractor: How to Extract Variables

You're surely here because you are looking for the Ultimate Tutorial explaining how JMeter's Regex Extractor works.

Great News! This post covers everything you need to know about variable extraction using Regular Expressions.

We'll learn many concepts along the way:

  • How to re-use JMeter variables (like ${foo}) in subsequent samplers and controllers (If Controller, Response Assertion, etc.),
  • How to extract single and multiple values from an HTTP message body,
  • How to write lightning fast regular expressions, and boost JMeter speed,
  • and more!

By the way, we suggest you to take a look at our tutorials explaining how to use Json Extractor and XPath Extractor too.

Let's have some fun!

Best Tools for the seasoned JMeter Tester

As a professional JMeter tester, i'm sure you've always dreamt about knowing what other seasoned JMeter QA tools use. The following list describes the most interesting tools to go along with JMeter.

Fiddler

Fiddler

Telerik Fiddler is a free web debugging tool which logs all HTTP(S) traffic between your computer and the Internet. Inspect traffic, set breakpoints, and fiddle with http requests.

Fiddler is really useful to record the http requests between your browser and the remote HTTP servers. It can also be used to debug http calls made by JMeter, by configuring JMeter to use Fiddler as a proxy.

Fiddler can also export the recorded HTTP requests in various formats include HAR files. Thanks to Fiddlers auto-generated SSL Certificate, once you have trusted the Fiddler CA Root Certificate, recording SSL encrypted website becomes a breeze.

Another batch of fresh new features

I know it's hot outside and you feel like you're missing out on your precious sun tan, but that doesn't mean folks at OctoPerf stopped working. In fact we've been working on major features, but more on that in a later post, today, I'd like to talk about the little things that will make you life even easier.

Advanced rights management

Well the first one is a not-so-little thing, we listened to feedbacks regarding the workspace and rights system and implemented an upgraded version. Previously, you could only give access to an entire workspace, which would not be convenient when collaborating with another team or working for several different customers. Since you might not want to allow someone to view or edit all your projects but just a particular one. Which is why we've added advanced rights management:

Rights

We are Obsessed With Quality

As mentioned in our previous article, Are You Buying Quality Software, we aim to deliver features at fast pace while maintaining the highest possible code quality. Our last article about our code quality has been written more than one year ago, how are we doing today? The following sections get you an insight about the code quality of our backend server written in Java.

So you’re saying you have no bugs?

We're not saying our software doesn't have bugs. Every single piece of software has glitches or bugs. But, it's quite usual for us to fix a bug and release a patch the same day. We thoroughly test our software entirely to make sure most of the bugs get caught before going into production.

Ask one of our competitors reports about their code quality. We are pretty sure no one will ever give you that information. We think you must know what you pay for.

Sonarqube Analysis

Quality Profile

Our code quality analysis is based on Sonarqube, using a custom quality profile with more than 750 rules enabled.

Sonarqube Quality Profile

Our profile used last year had a little over 700 rules enabled. We try to slowly increase the number of rules checking the code to further improve code quality. Feel free to use our own quality profile inside your company to check their code against our coding rules. I'm pretty sure you will be surprised by the results.

Test automation with OctoPerf's API

Even though automation is not always the best solution, you can still use some to save time on your day to day chores. And since OctoPerf is a GUI based tool we sometimes get remarks on how "unpractical" or "not devops friendly" this can be. Although I do not agree and still think that even a devops has better things to do than learning another coding language to test his code, I'd like to prove that even a GUI driven tool can be used to automate your testing.

So how does it works

And there's a simple reason for that, our backend is made of REST services. So anything that can be done through the GUI can be achieved with REST calls. That does not necessarily means that the work of our front end engineers is useless (they don't take criticism well so let's skip it) but rather that anything you need to do is possible. For today I'd like to automate a simple case to show you: updating the list of users and running a test. This is something you might want to do as part of your continuous integration pipeline, and making sure the list of users is up to date is definitely a plus when it comes to avoiding/analyzing errors. You can find the swagger of our REST api in the documentation or directly here:

API documentation