Search code examples
testingjenkinsjmeterjenkins-pluginsperformance-testing

How to dynamically change row labels in the JMeter summary report?


In my JMeter project I have a test fragment that consists of a Transaction controller which in turn executes a few http calls in a pretty complicated pattern which I want to reuse across all my tests (I simplified it to a single call in the example below). I'm interested in measuring performance of these HTTP calls as a whole, so I checked "Generate parent sample" to make it happen.

The test fragment is then referenced from the multiple Tread groups, running individual tests with different parameters (only one in the simplified example).

The test results are then aggregated using the Summary Report and this aggregated data is then used by Jenkins Performance plugin to display performance trends and notify developers about performance regressions.

Here is the problem. The rows in the generated Summary report have the same Label. It prevents the performance plugin from correctly comparing test results, basically random aggregated results are being matched.

The Label field in the Summary Report is derived from the Transaction Controller's Name attribute. To make these names unique, I tried defining a user variable ($TRANSACTION_NAME) in the thread group and using it for the Name in the Transaction Controller.

Unfortunately it doesn't work. The summary report uses the $TRANSACTION_NAME literal as the Label instead of its value, i.e. trans_1

User Variables

Transaction Controller Name

Summary Report

Is there a way to work it around and somehow change the Transaction Controller name dynamically? Or, perhaps, tell Summary Report to use a different var value as a Label when aggregating results?


Solution

  • User variable syntax is:

    ${VarName}

    Instead of User Defined Variables, use Flow Control Action with User Parameters as a child and define in this one the variable value

    If you're looking to learn jmeter correctly, this book will help you.