Expressions provide test data tables with a powerful way to logically link data or to express validation criteria that would normally be difficult with just literal values.
Any syntactically valid expression that can appear on the right side of an assignment statement can be entered as an expression in a test data table. Thus, all of the following are considered to be valid expressions: primitive values, strings (enclosed in double quotes), variable references, and constructor and method calls.
Expressions can also include variables, constants, and logical operators. Consequently, you can enter any of the following into a table cell:
Exp0_arg_1 + Exp0_arg_2 Exp0_arg_1 > Exp0_arg_2
The following screen capture shows examples of primitives (int 500 and boolean true), strings ("USD"), and variable references (objMoney.amount(), objMoney.currency(), and objMoney1).
The following screen capture shows an example of a constructor entered directly into a table cell:
Related concepts
Test data tables