Comparison Steps

When using variables with Cycle, you often need to compare the value of a variable to some other value to determine if the test is passing or failing. Cycle has a set of Steps that are designed specifically for performing variable comparisons. The list below contains the Cycle Steps commonly used for doing comparisons. For a complete list, see the Step Guide.

I verify number < NUMBER > is equal to < NUMBER >
I verify number < NUMBER > is not equal to < NUMBER >
I verify number < NUMBER > is greater than < NUMBER >
I verify number < NUMBER > is greater than or equal to < NUMBER >
I verify number < NUMBER > is less than < NUMBER >
I verify number < NUMBER > is less than or equal to < NUMBER >
I verify text "< TEXT >" is equal to "< TEXT >"
I verify text "< TEXT >" is not equal to "< TEXT >"

The Steps that use "number" are similar to the Steps that use "text", but they are not exactly the same. The "number" Steps do a numeric comparison of the two arguments, while the "text" Steps do a text or string comparison. The different types of comparison mean that I I verify number 1.0 is equal to 1 will pass; however I verify text "1.0" is equal to "1" will fail.

For example, assume you have assigned a value of "1.0" to a variable called "my_var".

Expression Result
I verify number $my_var is equal to "1" Passes
I verify text $my_var is equal to "1" Fails

results matching ""

    No results matching ""