{"id":965,"date":"2022-12-05T06:37:52","date_gmt":"2022-12-05T06:37:52","guid":{"rendered":"https:\/\/www.softwaretestingstuff.com\/?p=965"},"modified":"2023-03-07T05:26:27","modified_gmt":"2023-03-07T05:26:27","slug":"how-to-use-formulas-in-checkpoints","status":"publish","type":"post","link":"https:\/\/www.softwaretestingstuff.com\/2013\/08\/how-to-use-formulas-in-checkpoints.html","title":{"rendered":"How to use Formulas in Checkpoints"},"content":{"rendered":"\n

You can use a formula in a checkpoint to confirm that an object created on-the-fly or another variable object in your Web page or application contains the value it should for a given context. For example, suppose a shopping cart Web site displays a price total. You can create a text checkpoint on the displayed total value and use a Data Table formula to check whether the site properly computes the total, based on the individual prices of the products selected for purchase in each iteration.<\/p>\n\n\n\n

When you use the Data Table formula option with a checkpoint, QTP creates two columns 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\u2014TRUE or FALSE.<\/p>\n\n\n\n

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.<\/p>\n\n\n\n

You may need to follow below steps to use a formula in a checkpoint in QTP:<\/p>\n\n\n\n