Service Virtualization

Expand all | Collapse all

How to compare the value from JDBC result set from specific row and column

  • 1.  How to compare the value from JDBC result set from specific row and column

    Posted Oct 08, 2018 06:09 AM

    Scenario:

     

    Query returns a set of result set with multiple rows.

    How can we ensure to compare the data from 1 particular row.

     

    With the current Assertion "Database" -> "Ensure Result set contains expression" searches for value from the full result set and unable to customize for any specific row.



  • 2.  Re: How to compare the value from JDBC result set from specific row and column
    Best Answer

    Broadcom Employee
    Posted Oct 08, 2018 07:06 AM

    Hi Deeplena,

     

    I would do this as follows:

     

       

    •   First use the database filter “Extract Value from JDBC Result set”.

     

    This filter allows you to specify the required row number

     

    Assign the value to a property

     

       

    •   Then use assertion “Assure property matches expression”

     

    Cheers,

    Danny