Using calculated values in test instructions
The following expression can be used to dynamically integrate values from the current calculation into test instructions:
${ *LFET.num.Variablename [ .fin | .bef | .aft ] [ : 000.000 ] }
${ *LFET.num. |
Key prefix, initiates the use of a calculation result in the test instructions, see also: Test instructions with elements from the decision table |
Variablename |
The name of a variable If the variable does not exist, the message “unknown variable xxx” is included in the test instruction. |
Optional: .fin .bef .aft |
final - the final result for the variable in the test case, this is the default value before - the variable value BEFORE execution of the current rule after - the variable value AFTER execution of the current rule |
Optional: : 000.000 |
After a colon, a number format, mainly for specifying the desired number of digits before and after the decimal point
|
} |
End marker of the expression |
Examples
A variable ‘score’ is changed in the rule in which the test statement is executed and has the following values:
5.21892 - before the rule
7.38461 - according to the rule and also final for the test case
Abstract test statement in the decision table |
Concrete test statement in test case |
score: ${ *LFET.num.score } |
score: 7.38461 |
score: ${ *LFET.num.score : 0000.000 } |
score: 0007.385 |
score: ${ *LFET.num.score.bef } |
score: 5.21892 |
score: ${ *LFET.num.score.bef : 0.00 } |
score: 5.22 |