Modify the Pass/Fail condition of a TestStand Pass/Fail Step with a Custom ExpressionPrimary Software: TestStandPrimary Software Version: 4.0 Primary Software Fixed Version: N/A Secondary Software: N/A
Problem: I have a code module that returns multiple values and I want my TestStand step to pass or fail based on a condition that is a combination of these values. How can I modify my step to do this? Solution: If you are using a TestStand Pass/Fail Test Step, you have two options that will allow you to set your pass/fail conditions based on a custom expression containing multiple values. Modify the Data Source:
The reason this works is because the pass/fail status for this step type is determined by the Status Expression: What this means is that if the Data Source is not the string "Step.Result.PassFail", it will set the boolean Step.Result.PassFail to the result of whatever we entered as the Data Source. You can get to this by going to the Properties tab in the Step Settings panel and clicking on Expressions. Modify Step.Result.PassFail in the Post-Expression:
Note: If your code module returns values that you want to be part of your Pass/Fail condition, you must assign them to a variable in TestStand first in the Module tab. Related Links: Attachments:
Report Date: 02/16/2008 Last Updated: 03/07/2008 Document ID: 4IFANAPE |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||


