A symbol represents a piece of data in a data driven test case. It is like a
4Test identifier, except that its name begins with the
$ character. The value of a symbol can be assigned locally or inherited. Locally assigned symbols display in black and symbols
that inherit their value display in blue in the
Testplan Detail dialog box.
For example, consider the following test plan:
The test plan in the figure uses six symbols:
-
$Text is the text to enter in the document window.
-
$Position is the position of the insertion point in the document window.
-
$Pattern is the pattern to search for in the document window.
-
$Case is the state of the
Case Sensitive check box.
-
$Direction is the direction of the search.
-
$Expected is the expected match.
The symbols are named in the parameter list to the
FindTest testcase, within the parentheses after the test case name.
testcase: FindTest ({ $Text, $Position, $Pattern, $Case, $Direction, $Expected })
- The symbols are only named in the parameter list; they are not assigned values. The values are assigned at either the group
or test description level, depending on whether the values are shared by several tests or are unique to a single test. If
a symbol is defined at a level in the plan where it can be shared by a group of tests, each test can assign its own local
value to the symbol, overriding whatever value it had at the higher level. You can tell whether a symbol is locally assigned
by using the
Testplan Detail dialog box: Locally assigned symbols display in black. Symbols that inherit their values display in blue.
For example, in the preceding figure, each test description assigns its own unique values to the $Pattern and the $Expected
symbols. The remaining four symbols are assigned values at a group description level:
- The $Text symbol is assigned its value at the Find dialog group description level, because all eight tests of the Find dialog enter
the text
Silk Test Classic into the document window of the Text Editor application.
- The $Case symbol is assigned the value TRUE at the Case sensitive group description level and the value FALSE at the Case insensitive
group description level.
- The
$Direction symbol is assigned the value Down at the Forward group description level, and the value Up at the Backward group description
level.
- The
$Position symbol is assigned the value <HOME> at the Forward group description level, and the value <END> at the Backward group description
level.
Because the data that is common is factored out and defined at a higher level, it is easy to see exactly what is unique to
each test.