Previous Topic: Database AssertionsNext Topic: Ensure Result Set Contains Expression


Ensure Result Set Size

The Ensure Result Set Size assertion counts the rows in a result set and verifies that the size falls between an upper and lower value.

An example of this assertion could be verifying that the number of rows in an HTML table matches a specified expected value from a data set.

Complete the following fields:

Name

Defines the name of the assertion.

If

Specifies the behavior of the assertion from the drop-down list.

then

Specifies the step to which to redirect if the assertion fires.

Log

Identifies event text to print if the assertion fires.

Result set has warnings

If selected, the database could return warnings in the result set. To determine whether your database supports warnings in the result set, consult your system administrator.

Row Count >=

The minimum number of rows in the result set. -1 indicates no minimum.

Row Count <_=

The maximum number of rows in the result set. -1 indicates no maximum.

Click Run Assertion to execute the assertion.

For example, to ensure that a Database Assertion step returns one, and only one, row, set the Row Count >= field to "1" and the Row Count <= field to "1".