Specify Rows Dialog Box

Use to select rows to run the test case against. You use this dialog box to build queries that run against your data-driven test case.

Click Specify Rows on the Run Testcase dialog box or the Testplan Detail dialog box.

You cannot run using the sample record for individual tables. In order to run using the sample records for each table used by the test case, for example to do a quick test or if you are not connected to the database, click Use Sample Data from Script on the Run Testcase dialog box.

Table-by-table basis

When you select rows on a table-by-table basis, you use 'AND' and 'OR' actions. These may be used only to specify multiple conditions for a single table. You cannot include more than one table in a single 'where' clause. Conditions on separate tables must be specified independently, by selecting each table in the 'Table' list separately. The number of test cases that runs is:

# of rows selected for Table 1 X the # of rows selected for Table 2 X the # of rows for Table 3

Table
Lists the tables used by the test case to be run. For tables that are Microsoft Office Excel worksheets, the record names end in a dollar sign. Select a table in order to specify its where clause.
Run
Runs the selected test case using the queries you have specified.
Debug
Opens the file in which the test case resides, enters debugging mode and places a breakpoint at the first line of the test case. Debugging mode makes available all the debugging commands on the Breakpoint, Debug and View menus.
Query for this table area
Guides you to enter the where clause for the selected table. If you leave this area blank and simply click Run, the default query selects all rows for the table.

The where clause of a query has the form:

(<Column> <relational
			 operator> <value>) [and|or] (<Column> <relational
			 operator> <value>)...
image\SpecifyRows_labels_bottom_partial_shg.gif

select * from <tablename> where the first list contains a list of columns from the table selected above.

where (the second list) lists the following relational operators that apply to all column types:

To indicate Select
Equals =
Not equal to <>
Greater than >
Greater than or equal to >=
Less than <
Less than or equal to <=
Like (typically used with STRING columns) like

There are three additional relational operators that you can type into the Editable query area – but they do not appear in the where dropdown.

To Indicate Type
Between two values (value1 <= value <= value2) between <value1> and <value2>
In a set of discrete values in (<value>, <value>, <value>)
Not in a set of discrete values not in (<value>, <value>, <value>)
Enter values area

All string values must be enclosed in single quotation marks, for example, 'value'. For string columns, you can match a pattern by using like ‘pattern’. The pattern can contain the single character (_) wildcard or the 0 or more characters (%) wildcard.

If a column allows NULL values, then you can use the following query to return only those rows for which the column contains a value:

select * from table_name where column_name <> NULL

Similarly, the following query would return only those rows for which the column is empty:

select * from table_name where column_name = NULL
Action
Select Done to indicate you have finished entering where clauses or select AND or OR to indicate the relationship to another where clause. After you selected the appropriate action, the where clause that you have created appears in the bottom box on this dialog. You can add additional where clauses or click Done.
Editable query area
The where clauses that you create appear here after you click DONE, AND, or OR. You can add additional where clauses in this area by clicking and typing them in.

Sample queries

The following table shows several sample queries and their corresponding "where" clause.

To find Use this WHERE clause
adults whose first names begin with 'B'
(FirstName like 'B%') and (Age >= 18)
bananas, cherries, apples, or any type of berry
(Fruit in ('banana', 'cherry', 'apple')) or (Fruit like '%berry')
people born in the 1960's with 3-letter last names
(YearOfBirth between 1960 and 1969) and (LastName like '___')