11-12-2010 09:36 AM
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.
Solved! Go to Solution.
11-12-2010 10:08 AM - edited 11-12-2010 10:08 AM
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.
11-12-2010 11:09 AM
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.