What I am trying to achieve:
Insert records into Database and verify that the count of records inserted matches with the expected count.
Steps performed:
- I have inserted 1 record into a database using a HTTP Request(API).
- I have included a JDBC Request to return the count of records inserted in the database and stored the count * as RESULT
- I have added the variable name in JDBC request as RESULT
- I have created a response assertion in JDBC request and passed the 'JMeter Variable Name to use' as RESULT
- Selected the 'field to test' as 'Text Response'
- 'Pattern Matching Rules' as 'Equal'
- 'Patterns to Test' as '{Result=1}'
- Executed the script
Assertion Result:
Assertion error: false Assertion failure : true Assertion failure message: Test failed: variable(RESULT)expected to equal/
*******received : [[[[{RESULT=1}]]]] *******comparison: [[[{RESULT=1} ]]]
If this issue is resolved, I want to increment the count. Please advise.
