Insert counter variable inside body data of http sampler in jmeter
21:58 08 Nov 2016

I am using jmeter to simulate concurrent users when doing a transaction. I have a field named "TransactionReference" which is unique. What I want to do is to be able to make these users transact.

What I did so far was I recorded the transaction process (using HTTP Test Script Recorder) and I got a static value for the TransactionReference. So everytime I run my test script, it does not insert the new transaction created because the TransactionReference is not unique anymore. I tried to make it dynamic (auto incremental) by using the Counter Config element. I have a variable named "ctr" and I call it in the body data using "${ctr}". However, I am getting a "MalformedJsonException" in my logs.

My question is, how am I supposed to call my counter variable inside my http sampler post body data correctly?

json http jmeter counter performance-testing