NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

ThreadOpt values - is it possible to set them and what are the ranges?

Hi there,

 

I have a problem on my TestStand 4.2 platform, with test step result, formed and received from called external sequences results. In my Main sequence, in Post-Expression I defined condition, according to which the "Step.Result.Status" is passed or failed, and it works. But the problem is that in Status Expression field there is following statement: "(Step.Result.Status == "Done" && (Step.TS.SData.ThreadOpt == 0 || Step.TS.SData.ThreadOpt == 3)) ? "Passed" : Step.Result.Status". After deep search in the user manual, I found that (Note from "Expression Tab - Step Properties Dialog Box"): "Certain types of steps, such as Numeric Limit Tests, Multiple Numeric Limit Tests, String Value Tests, Pass/Fail Tests, and Statement steps, reserve one or more of these expressions to perform operations specific to the type of step or a substep performs the operation. In these cases, you cannot use the expressions the step type reserves, which appear dimmed on the tab." 

Now, my problem is that at this specific step I call to an external sequence, which returns results and it is correct, but if these results, compared to expected are not the same, my step in the main sequence fails. Which is OK. But when the final report is generated I see there "Number of Tests Failed: 0", which is not OK. Since I can't change the "Step.Result.Status == Done", which comes from the external sequence, I thought that may be there is a place to change the "Step.TS.SData.ThreadOpt" and this way to cause to main sequence to correctly report "Failed Tests <> 0"??? 

Does anyone has an idea whether it is possible to set this the ThreadOpt value and what is the accepted range?

 

Your feedbacks and inputs are highly appreciated.

 

Stephan

0 Kudos
Message 1 of 8
(3,344 Views)

You don't really want to change the threadopt as that will change how the step executed, what you should probably do instead is go to the adapter configuration dialog and uncheck the checkbox that hides the sequence adapter, then use the pass/fail step type along with the sequence adapter rather than the sequence call step type.

 

Hope this helps,

-Doug

Message 2 of 8
(3,335 Views)

Mostly out of curiosity, what is does a value of zero or three for the ThreadOpt property relate to?

0 Kudos
Message 3 of 8
(3,268 Views)

From what I can tell, the ThreadOpt variable points to the Execution Options in the module tab.  Therefore, 0 = None, 1 = New Thread, 2 = New Execution and 3 = Use Remote Computer.

 

The reason I stumbled across this is that I couldn't figure out why my sequence call was returning "done" rather than "passed".  My normal process is to set it to 1, but based on this info, it needs to be either set to None or Use Remote Computer if you want anything other than "Done" to be returned.  If you set it to 1 - None, you can actually observe the subsequence running, and all of the step results will be included in the report (not just the status).  

 

GSinMN 

Message 4 of 8
(2,944 Views)

To ensure maximum forwards compatibility, I recommend you use the SequenceCallModule API rather than directly modifying any of the hidden properties under TS. Also the API is documented so you can refer to the documentation for details rather than having to reverse engineer what the hidden properties correspond to.

 

Hope this helps,

-Doug

0 Kudos
Message 5 of 8
(2,927 Views)

Hello Doug,

 

  I didn't think I was modifying any hidden properties.  It's just configuring a sequence call step when you add it to the sequence.  The "Execution Options" are clearly shown in a dropdown menu on the Module tab.  I was just pointing out that this seems to be what sets the ThreadOpt variable.  

 

GSinMN

0 Kudos
Message 6 of 8
(2,925 Views)

@GSinMN wrote:

Hello Doug,

 

  I didn't think I was modifying any hidden properties.  It's just configuring a sequence call step when you add it to the sequence.  The "Execution Options" are clearly shown in a dropdown menu on the Module tab.  I was just pointing out that this seems to be what sets the ThreadOpt variable.  

 

GSinMN


Maybe I misunderstood. When you said "My normal process is to set it to 1, but based on this info, it needs to be either set to None or Use Remote Computer if you want anything other than "Done" to be returned." I thought you meant that you were setting the property directly rather than setting your sequence call steps to "New Thread" with the combobox.

 

-Doug

0 Kudos
Message 7 of 8
(2,908 Views)

Hello Doug,

 

  Yes, when I went back and read what I wrote, I saw some inconsistencies in my vernacular that could have easily caused confusion (and there's actually a mistake there too). It was really just a guess when I surmised that "ThreadOpt" might mean "Thread Options".  I tested my theory, and it seemed to be correct.

 

Once again, didn't need to do anything sneaky, just using the normal configuration settings.   

 

GSinMN 

0 Kudos
Message 8 of 8
(2,905 Views)