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
required The script to evaluate. This must be valid Perl code. This field allows for multi-line Perl code to be written. Examples Optional Message to record in the test instance Examples Optional Message to record in the test instance Examples Optional Message to record in the test instance ExamplesEvaluate
initialCallSegment_cause
is greater than 22
.$i->{ReleaseCall}{initialCallSegment_cause} > 22
Pass
check_log
if the expression evaluates true.{'OK Cause ' . $i->{ReleaseCall}{initialCallSegment_cause} . ', is > 22.'}
Fail
check_log
if the expression evaluates false.{'Bad Cause ' . $i->{ReleaseCall}{initialCallSegment_cause} . ', <= 22.'}
Abort
check_log
if the expression evaluates false. The test instance will also be aborted in this case.{'Abort Cause ' . $i->{ReleaseCall}{initialCallSegment_cause} . ', = 0.'}