NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I include results of a subsequence, which runs in a new thread, in the main sequence test report

Solved!
Go to solution

Hi!

I', m working with TestStand Version 4.2.1. I have a main sequence, which calkls different subsequences. All these steps are properly reported. One of subsequences runs as "new thread". How can I include its results in common test report of the main sequence?

I have markes variables of the subsequence as it is requred for test report (it works OK if it is not a new thread). If the the numerical test, which is executed in this subsequence is correct, I get no results at all. If the numeric test failed I get somewhere in the main sequence report a "red message", that test failed whithout any reference to the step or values of vaiables which were not correct.

I tried an option "On the fly" in the Report Configuration , but haven' got any useful results. What shall I do?

Best regards

0 Kudos
Message 1 of 10
(4,942 Views)
Solution
Accepted by topic author pericles

Hello pericles,

 

You can use a wait step to obtain the results of the thread once it completes. Place a Wait step after the call to the thread in your MainSequence at the location that you'd like to results to be added to report (relative to other results). In the wait step settings tab, select Wait for: Thread, and then select the threaded sequence call from the Specify by Sequence Call radio button. You can also use an Object Reference if you need the results to show up somewhere where else - you'd just need to add an Object Reference to the threaded sequence call in it's thread settings dialog.

 

Hope this helps.

 

-Jack

Message 2 of 10
(4,929 Views)

Thank you very much, it works well. An additional question : what is the Object Reference to the Thread? I used the first option "Specify by Sequence Call", it were enough to achieve results I wanted, but I would like also to know how can I adress the thread by reference.

Thank you in advance.

0 Kudos
Message 3 of 10
(4,902 Views)

Hello, Jack!

There is still one question more concerning the test report: I use one and the same subsequence which I starts in 2 threads with different parameters. When I put a step "Wait for thread" and refer to the sequence call it is one and the same name. Obviously the report builder can't distinguish between 2 call to the same subsequence. It is possible still to get separate reports entry or shall I use in this case another method?

Regards

0 Kudos
Message 4 of 10
(4,894 Views)

Hi,

 

This this where you would use the Object Reference to the Thread, so you would need to return back the object reference to the caller so that you can use this in your two waits.

 

 

Regards
Ray Farmer
0 Kudos
Message 5 of 10
(4,888 Views)

Hi,

I tried it but without success:

1) I got a reference to the Thread as "Locals.Step1=RunState.Thread" for every of 2 steps which start a thread

2) I put both "Waits" after steps with (and without) threads, at the same place, where they were before

3) The sequence run OK, but when it came to Wait for Thread 1 it waited for ever, I had to terminate sequence

Does it mean, that I got a false reference (suppose No - please, have a look at attached pic)?

Or does it mean, that Waits are badly placed in the sequence (threads are already terminated)? Here is a pic of sequeces calls with Wait after them.

Regards

Download All
0 Kudos
Message 6 of 10
(4,883 Views)

Hi,

 

In the Specify Sequence Call dialog, then where you select to run in new thread you get additional dialog. There should be a place where you enter you locals.Step1 or Step2 variable. (I haven't got this in front of me so I am working from memory, so forget me if I am not using the precise wording or actions)

 

RunState.Thread is the thread that is the sequence with the waits in which is probably why it's waiting for ever.

 

 

Regards
Ray Farmer
Message 7 of 10
(4,879 Views)

Thank you very much, I found it!

0 Kudos
Message 8 of 10
(4,876 Views)

Ray,

 

Thanks for the help.

 

Pericles,

 

If this doesn't address the issue, let us know.

 

-Jack

0 Kudos
Message 9 of 10
(4,870 Views)

It does - works OK. Thank you bothSmiley Happy

0 Kudos
Message 10 of 10
(4,853 Views)