NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Failed step in New Thread does not show in Report

Solved!
Go to solution

Hi,

 

I call a sub sequence in a 'New Thread'.  One step inside this sub Sequence fails.

 

The end result is Test Failed as it is supposed to be but the failed step does not show.  (I display only failed steps in the report).

 

 

Can it be fixed?

 

Thanks

Rafi

0 Kudos
Message 1 of 8
(5,323 Views)

Hi,

 

I think you need to use a Wait step in you Caller sequence so that the results are passed back.

 

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 8
(5,321 Views)
Solution
Accepted by Rafi2003

This is correct. If you look at the Execution Entry Point of the Process Model, you will notice that once the Main Sequence has finished execution, report generation and other things start.


If you spawn a sequence in new thread from Main Sequence, then MainSequence could finish before the SubSequence finishes execution and the results of the SubSequence don't propogate back to MainSequence. So as Ray mentioned, you could force the MainSequence to wait for the SubSequence to complete execution using a Wait step. 

See attached screenshot and/or example:

SubSequenceCall.jpg

Jervin Justin
NI TestStand Product Manager
Message 3 of 8
(5,302 Views)

Hi Jervin,

 

Thank you very much for your detailed answer.  Also, thank you for teaching me this new thing about the wait for thread step.

 

It does do the job, however, I still do not understand something.

 

As you said (and the articles you mentioned too), the result of the subsequence does not show in the final report since the mainSequence does not wait for that sub seq to complete.  THIS IS NOT TRUE.  I always synchronize my new threads subsequences.  I do it with the 'Event' step.  (set event in the new thread,  Wait for event in the caller seq).  The technique works, the event step waits for the subsequence to complete.  Nevertheless, the subsequence steps do not appear in the final report.  I checked the resultList after the subsequence is complete (by putting a break after the 'wait for event' step.  The information of the subsequence does not appear there.  When I added the special 'Wait' step you advice.  The information did appear in the report.

 

Any explanation to that?

 

Thanks

Rafi

0 Kudos
Message 5 of 8
(5,271 Views)

Rafi,

 

I dont fully understand what's going on but its something in the Wait step allows the ResultsList container to be passed on too the sequence that's waiting.

 

Regards

Ray

Regards
Ray Farmer
0 Kudos
Message 6 of 8
(5,255 Views)

Rafi,

The key sentence in the first link Jervin sent is "The default report generation will include any result that is included in the MainSequence's ResultList container."  Even when you synchronize the subsequence there is no step that copies the subsequence's ResultList to the MainSequence, therefore no step results are reported.  However the Wait step automatically accomplishes this copying for you.  

If you wanted to you could have a two step process - one to synchronize the subsequence and another to manually copy the ResultList from your subsequence to the MainSequence, but the Wait step does both for you so it is a much nicer solution.

Hope that clears things up a bit more!

John B.
Applications Engineer
National Instruments
Message 7 of 8
(5,245 Views)

Thank  you all,

 

Ray, John, Jervin...it is clear now.  Thanks

 

Rafi

0 Kudos
Message 8 of 8
(5,226 Views)