NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Execution.ResultStatus is empty.

Solved!
Go to solution

Greetings,

 

I am looking for some help with the Execution.ResultStatus property.  I am getting the value of this property during an execution and receiving an empty string.  Basically, this flies against my expectation that the most recent status of the test would populate the value of this property at all times.  Is anyone familiar with this property and its uses?

 

I'll try to frame this problem with some context:

 

1. I'm getting this property during the cleanup section of my main sequence.

2. The end game here is to get the overall status of the test at the end so that I can report it up to a line management system.

3. I can populate this value manually and get it later in the test, but why on earth is it an empty string?

4. The reason I'm using this instead of SequenceFailed is that I need to report if a test was terminated or aborted.

 

Thanks in advance.

0 Kudos
Message 1 of 3
(3,275 Views)
Solution
Accepted by topic author thetrapezeswinger

My guess is that it's only populated after the execution completes, like most other Status properties. You can use the method Execution.GetStates() to get the state of the execution or you can create a Termination Monitor and then query it.

 

I attached a demo of the GetStates method. You might be able to condense the cleanup into a single step, I didn't work too hard at it.

0 Kudos
Message 2 of 3
(3,272 Views)

Thank you.  GetStates in combination with SequenceFailed and SequenceErrorOccurred gets me what I need.  I'm still curious as to when the ResultStatus or ResultObject for that matter are actually relevant, but for now I can get what I need.

 

Thanks again.

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