Search code examples
performancejmeterperformance-testingload-testingjmeter-5.0

Unable to capture Client transaction ID in Jmeter


I am currently working in a insurance creation application. I have been facing a challenge in Capturing the Transaction ID. Below is a recording for example, Sample Start:2022-01-05 19:42:39 IST {"clientTransactionId":"2022010519423991400003554512008008822698"} Sample Start:2022-01-05 19:37:10 IST {"applicationTransactionId":"220105193709901533"}

The above recording shows the clientTransactionId and applicationTransactionId having the first 14 digits as timestamp and the rest as random numbers. I am looking for a function to capture these transaction IDs as I have never faced such challenge before (Combination of Timestamp and Random numbers). Please help.


Solution

  • Just add JSON JMESPath Extractor as a child of the request which returns the above response and configure it like:

    • Names of created variables: anything meaningful, i.e. clientTransactionId
    • JMESPath Expressions: clientTransactionId
    • Match No: 1

    enter image description here

    Once done you will be able to refer extracted value as ${clientTransactionId} JMeter Variable where required

    enter image description here

    applicationTransactionId can be handled in exactly the same manner

    More information: