Hi All,

Jmeter Version: 5.0

I have a scenario where we fire custom json onto application. The application 
only responds as success or failure. This is followed by checking the fire 
event id in a specific table in database. So I need to connect to DB and then 
check the event id value sent in request. 
The problem here is that the response is not having the event id which was sent 
for the request thus I couldn’t find a way. Is there a way I can check the 
request event id field and fire a DB query based on that.
 

 For load testing each event is maintained as unique using the function; 
${__threadNum}${__time(ddMMyyyyHHmmssSSS)}


Request : 
{"event_id":"${__threadNum}${__time(ddMMyyyyHHmmssSSS)}","EventSubType":"SUBEVENT","event-name":"TEST
 EVENT","EventType":"Sample type","source":"fin","msgBody":"Body text"}

Response : Success

DB Query : select count(1) from events where 
event_id=${__threadNum}${__time(ddMMyyyyHHmmssSSS)}

Expected Response: If the count is 1 then “Test Case Successful”  else “Test 
Case failed”.

Kindly help.

Let me know in case of any more information.

Warm Regards,
Manish Taneja

Reply via email to