Performing Calculations - WinRunner

You can create tests that perform simple calculations using mathematical operators. For example, you can use a multiplication operator to multiply the values displayed in two text boxes in your application. TSL supports the following mathematical operators:

+ addition
- subtraction
- negation(a negative number - unary operator)
* multiplication
/ division
% modulus
^ or ** exponent
++ increment(adds 1 to its operand - unary operator)
-- decrement(subtracts 1 from its operand - unary operator)

TSL supports five additional types of operators: concatenation, relational, logical, conditional, and assignment. It also includes functions that can perform complex calculations such as sin and exp.

The following example uses the Flight Reservation application. WinRunner reads the price of both an economy ticket and a business ticket. It then checks whether the price difference is greater than $100.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

WinRunner Topics