Formulas in data tables
Relevant for: GUI tests and scripted GUI components
When, working with data tables, you can use Microsoft Excel formulas in your data table. This enables you to create contextually relevant data during the run session. You can also use formulas as part of a checkpoint to check that objects created on-the-fly (dynamically generated) or other variable objects in your Web page or application have the values you expect for a given context.
When you use formulas in a data table to compare values (generally in a checkpoint), the values you compare must be of the same type, for example integers or strings. When you extract values from different places in your applications using different functions, the values may not be of the same type. Although these values may look identical on the screen, a comparison of them will fail, since, for example, 8.2 is not equal to "8.2".
When you use the data table formula option with a checkpoint, two columns are created in the data table. The first column contains a default checkpoint formula. The second column contains the value to be checked in the form of an output parameter. The result of the formula is Boolean—TRUE or FALSE.
A FALSE result in the checkpoint column during a test run causes the test to fail.
After you finish adding the checkpoint, you can modify the default formula in the first column to perform the check you need.