07-19-2010 03:27 AM
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
Solved! Go to Solution.
07-19-2010 09:53 AM
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
07-20-2010 02:55 AM
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.
07-20-2010 05:18 AM
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
07-20-2010 06:28 AM
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.
07-20-2010 07:35 AM
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
07-20-2010 08:32 AM
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.
07-20-2010 08:38 AM
Thank you very much, I found it!
07-20-2010 08:58 AM
Ray,
Thanks for the help.
Pericles,
If this doesn't address the issue, let us know.
-Jack
07-20-2010 09:35 AM
It does - works OK. Thank you both