NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Showing the results window after termination

Solved!
Go to solution

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

0 Kudos
Message 1 of 7
(4,111 Views)

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,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 7
(4,100 Views)

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

0 Kudos
Message 3 of 7
(4,097 Views)

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. 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 7
(4,091 Views)

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

0 Kudos
Message 5 of 7
(4,028 Views)
Solution
Accepted by topic author Tomahawk1277

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,

 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 6 of 7
(4,023 Views)

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!

0 Kudos
Message 7 of 7
(4,020 Views)