TestProject Forum

Evaluate Mathematical Expression Passes on False

So, from what I can tell, the action ‘Evaluate Mathematical Expression’ will report a STEP PASS regardless off the result of the evaluation.
My Example:

0 > 0 = 0 (False) PASS
1 > 0 = 1 (True) PASS

This was planned to be the final step in my test to establish if any of my subtests had passed (which would ++ a parameter if they passed).

Is there an action that would fail if a boolean (or integer) was false?
I think I need to find a way to fail a test IF ‘Evaluate Mathematical Expresson’ returned a ‘0’


1 Like

This action gives you the results as output, 0 for False and 1 for True, you can save this output into a parameter so you will be able to use it in your next steps.
If you want to fail the step if it does not meet your expectation, you can add a validation so the step will fail if it is not the expected result.


1 Like

Thank you kfir.yosef, you have achieved god status! That is great… now just one more question. I will ask in a separate topic though.