Skip to content
/ .. / .. /
Difference Rule





Difference Rule

This rule calculates the difference between ticket properties and verifies that the result equals an expected value.

Difference Equals Property

Verifies that the difference between two properties equals the expected property.

Syntax

1
check <minuend Date|Number|String> minus <subtrahend Date|Number|String> equals <difference Date|Number|String>;
Parameters

  • minuend - The value that the subtrahend will be subtracted from. Must be a Date, Number or String representation of a Number. Date will be converted to Epoch (milliseconds).

  • subtrahend - The value subtracted from minuend. Must be a Date, Number or String representation of a Number. Date will be converted to Epoch (milliseconds).

  • difference - The expected difference between the subtrahend and minuend. Must be a Date, Number or String representation of a Number. Date will be converted to Epoch (milliseconds).

Example

1
2
3
check property "Balance_before_event" minus property "Balance_after_event" equals property "Call_Cost";

check property "Balance_before_event" minus property "Balance_after_event" equals 153;

Additional Examples

First Value Second Value Difference Check Result
300 100 200 OK
300 500 200 FAIL