Assert

Script Assert

The Assert operation is used to perform logic checks within the test instance. The pass/fail results will be written to the check_log for the test instance. If configured to do so, a failed check will result in the test instance being aborted.


Test Fields

Evaluate

required

The script to evaluate. This must be valid Perl code. This field allows for multi-line Perl code to be written.

Examples

  • This is an example of a logic check checking that the initialCallSegment_cause is greater than 22.
$i->{ReleaseCall}{initialCallSegment_cause} > 22

Pass

Optional

Message to record in the test instance check_log if the expression evaluates true.

Examples

{'OK Cause ' . $i->{ReleaseCall}{initialCallSegment_cause} . ', is > 22.'}

Fail

Optional

Message to record in the test instance check_log if the expression evaluates false.

Examples

{'Bad Cause ' . $i->{ReleaseCall}{initialCallSegment_cause} . ', <= 22.'}

Abort

Optional

Message to record in the test instance check_log if the expression evaluates false. The test instance will also be aborted in this case.

Examples

{'Abort Cause ' . $i->{ReleaseCall}{initialCallSegment_cause} . ', = 0.'}