Verifying a Database Result Set Row Count

Result set row-count verifications confirm that returned database result-sets include the specified number of rows. Errors are raised if returned result sets have less or more than the specified number of rows.

  1. Choose File > Add TrueLogs . The Open dialog box opens.
  2. Select a replay database TrueLog and click OK. The replay TrueLog opens in TrueLog Explorer.
  3. Choose Edit > Step through TrueLog . Alternative: Click Step through TrueLog on the toolbar. The Step through TrueLog dialog box opens.
  4. Click the Result sets option button.
  5. Click Find Next to advance to the first database command that returns a result set. For example, you might want fetch commands, such as Ora8StmtFetch. The first data element in the set is selected.
  6. Perform one of the following steps:
    • Right-click a data element to verify and choose Verify Result Set Row Count.
    • Click Add Verifications on the workflow bar and click Verify the row count.
    The row count of the current database result is displayed in the value text box, and the value option button is selected.
  7. Optional: To verify against an existing parameter or a new parameter, click parameter value.
    1. Click [...] to browse to and select a parameter. If no parameters exists, the Parameter Wizard opens, enabling you to create a new parameter.
    2. Click OK.
  8. Specify whether or not the row count must match exactly, at least, or at most the current row count.
  9. In the Severity group box, specify the severity that is raised if the verification returns a negative result.
  10. Click OK. The function is added to the test script.

Initiate a Try Script run to confirm that the script runs without error.