Reputation: 2928
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
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?
Upvotes: 2
Views: 1732
Reputation: 168002
${TRANSACTION_NAME}
or using __V() function like ${__V(TRANSACTION_NAME)}
Include duration of timer and pre-post processors in generated sample
box, it's false since JMeter 2.11. By default JMeter doesn't add the duration of Pre/Post Processors and Timers to the Sample Result and this is something Transaction Controller's should be doing as well as otherwise you might get false negative results. I believe you should be using Pre/Post Processors for parameterisation/correlation and Timers to mimic users "think times" and that time should be excluded from JMeter metrics as it doesn't have anything in common with real application under test performance. For example if your response time is 1 second and you have 5 seconds of "sleep" between requests - in your case JMeter will report 6 seconds response time which is 6x times more than actual which might be confusing.Upvotes: 1
Reputation: 34516
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.
Upvotes: 2