Forum Discussion

srunkana's avatar
srunkana
New Contributor
13 years ago

Validate JDBC teststep responses

hi
I am new to SOAPUI and using the open source and need help in validating the JDBC teststep response XML. Here is my requirement
Added a JDBC teststep in a testcase
I have connected to DB and tested the connection successfully
Ran a query and received the output as well as expected
The response XML is as below
<Results>
<ResultSet fetchSize="25">
<Row rowNumber="1">
<ID>35034</ID>
<STATUS>S</STATUS>
</Row>
</ResultSet>
</Results>

Now my requirement is to verify the value ("S") of status element. Could someone please provide me a solution?
  • Try this in the Assertions part of the JDBC Test Step
    Use an Xpath Assertion
    In XPath Assertion window, use the below expression
    //Row[1]/STATUS ="S"

    Hit the "Select from current" button and you should "true" populated in the "Expected Result" window