I have 3 rise-time double values that a test step outputs from a scope, one represents the 28V rise time going into a DUT and then a 3V and 5V rise time exiting the DUT and I have added 2 limits mixins on the step to verify that the 2 output rise times are within limits based on the rise time of 28V, so one effective limit check is:
- RiseTime28V + 0.02 < RiseTime5V < RiseTime28V + 0.15
When I run the step, the output values are:
- RiseTime28V: 0.3
- RiseTime3V: 0.4
- RiseTime5V: 0.4
However the output of the Limit test shows:
- Limit check for ‘Settings \ Rise Time 3p3V’ in step ‘ExpressionBugTestStep’ failed: Expected 0.02 < ‘Settings \ Rise Time 3p3V’ < 0.15. (Was 0.4)
So a value of 0 is returned for RiseTime28V when evaluating the expression and not the value of 0.3 that the test set. The second time I run it passes because 0.3 is the value of the output before running the step.
I assume the issue is that the expression is being evaluated too early or it is getting a cached value somehow. This could be a bug or just a limitation in the current design.
I tried to find the expressions code to potentially debug but it is not accessible here: https://github.com/opentap/expressions
Here is a link to the test and a test plan that calls it: ExpressionsBug.zip