06-30-2009 11:14 AM
Hi all,
When I terminate my batch sequence execution in TS 4.0 using "RunState.Engine.TerminateAll()", it shows grayed-out windows and won't show the results window, even though it saves the results into an XML file on disk.
Is there a way I can show the results window to the operator after the sequence is terminated?
Many thanks,
Chris
Solved! Go to Solution.
06-30-2009 03:29 PM
I'm not sure why it doesn't show up. But you could open an external viewer. Configure>>External Viewers. Add one and point it to IE or FireFox. Then specify the format depending on which type of reports you are generating and check the Automatically Launch Viewer.
If you look at the report you won't see all of the data. Because the report path gets set before the termination is called.
Also, are you doing on the fly reporting?
Hope this helps some,
06-30-2009 03:37 PM
Thanks for the reply, Jigg.
I tried your suggestion but to no avail. The results window shows up if the test completes successfully but not if it is terminated. Since the operator has the option of stopping the test early, I'd like TestStand to show the results window on termination without the operator having to navigate to the file on the disk.
I've tried using on-the-fly reporting as well.
Thanks for the input,
Chris
06-30-2009 05:58 PM
If you look in your model you will find a step called Read Entire Report. This is just making an activex call to Report.Load. This is what displays the report at the end of an execution. If this does not get called no report will get loaded. Since you are terminating then no report is getting loaded. In fact if you don't have on the fly reporting on then the html files that make up each thread of a multithreaded batch run won't contain any data which will result in no report.
If you use the ProcessCleanup callback you should be able to load the report in there.
07-08-2009 03:12 PM
Thanks Jigg,
I've turned on-the-fly reporting on and am using the ProcessCleanup callback but am getting an error from the Report.Load activeX action. It says:
File or directory not found.. Error reading from file ''.
I'm using RunState.Report.Location as the pathString. The BatchModel model file uses Locals.ModelData.ReportFilePath as the path, but I can't access the ModelData it has and figured RunState.Report.Location would work.
It IS generating a report in the results directory, I just can't point the callback to the correct filepath yet.
Getting close....
Thanks,
Chris
07-08-2009 03:55 PM
Chris,
I used RunState.Root.Sequence.Locals.ModelData.ReportFilePath as the pathString parameter. It seems that RunState.Report.Location doesn't get updated until after the Load call has been issued. Report.Location would be the better option but in this scenario you will have to go to the root hoping that is the process model.
The only other option would be to hard code it in there but then you'd have to generate the exact same report every time.
Hope this helps,
07-08-2009 04:29 PM
Awesome, it works! I'm using RunState.Root.Sequence.Locals.ModelData.ReportFilePath along with on-the-fly xml reporting and it shows the results of each individual UUT up to the time the test was aborted.
Thanks Jigg!