assertNumericCompare

Basic numeric comparisons, between two numbers or a number (in test column a) and a range (in test column b).

Numbers may be integer or floating point. String comparisons are not supported.

example of use

Command Param 1 Param 2 Test purpose.
assertNumericCompare 5 >10 Tests whether 5 is greater than 10.
assertNumericCompare 6 <4234.2312 Test whether 6 is less than 4234.2312.
assertNumericCompare 10 ==15 Test whether 10 is equal to 15.
assertNumericCompare 10 !=15 Test whether 10 is not equal to 15.
assertNumericCompare 6 1..23 Test whether 6 is in the range 1 to 23.
assertNumericCompare 1 !0.0001..0.6545 Test whether 1 is not in the range 0.0001 to 0.6545.

Of course, you can use Selenium's store commands to create variables for use in an assertNumericCompare test.
E.g. for the test on whether 6 is in the range 1 to 23...

Command Param 1 Param 2
store 6 myVar
store 1 rangeMin
store 23 rangeMax
assertNumericCompare ${myVar} javascript{storedVars['rangeMin'] + ".." + storedVars['rangeMax']}

notes

A comprehensive usage demonstration can be found in the associated test suite.

File: 

AttachmentSize
Plain text icon assertNumericCompare.txt3.09 KB

Type: 

User-Extension