NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Does an if condition should work via RunSelectedSteps?

Hallo,

I start a part of the Sequence via RunSelectedSteps and between the steps there is a condition like this:

if (Locals.Count == 5)
    { do something }
End

Although the variable locals.count isn't equal to 5, it seems that TS handles the if condition as true and execute the steps. Is this a correct behavior? If you don't know this, it might confuse the debuging process a little bit.

Regards
Carsten
0 Kudos
Message 1 of 3
(3,022 Views)

Carsten -

There are two options on the Execution tab of the Station Options dialog box that you should look at: "Branch Mode" and "Evaluate Preconditions". The one that will affect your question is "Branch Mode". Basically the If will be ignored if the setting is "Ignore All Branching" or "Ignore Branches to Unselected Steps" and you do not select the End step. Try setting this to "Allow All Branching" to see if the behavior is what you want.

"Propagate Failures and Errors from Nested Interactive Execution to Calling Execution" is another useful setting to be aware of.

Scott Richardson
https://testeract.com
Message 2 of 3
(3,013 Views)

Scott -

thank you for the tip. That was my mistake. The branching mode is a very interesting thing...

Regards Carsten

0 Kudos
Message 3 of 3
(3,005 Views)