You need to use one of JMeter Assertions which are designed to check if returned data matches your test case.
I would do it as follows:
- Update something via REST API call by using a JMEter variable i.e. EXPECTED
- Fetch information from the database via JDBC Request and store in to another JMeter variable, i.e. ACTUAL
- Use i.e. Beanshell Assertion to compare 2 variables.
Example Beanshell Assertion code:
String expected = vars.get("EXPECTED"); String actual = vars.get("ACTUAL"); if (expected.equals(actual)) { Failure = false; } else { Failure = true; FailureMessage = "Difference detected, expected: " + expected + " and actual: " + actual; }