NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I change report options programatically through Teststand?

Hello.

I know how to change report options in TestStand via the menus, however, I would like to allow a user using TestExec to be able to change some of these options within the test sequence they are running.

For example, when they start a sequence, I would like a popup box (or vi if the popup box isn't applicable) to ask them if they'd like to continue the previous report, or start a new one. If continue, open a search dialog box, so they can find the report they'd like to continue and select it, if a new report open a dialog box where they can type in the new report name.

Does this make any sense?

So, I'd like to give the user control of report options, such as Append, etc. inside a test sequence
and not using the menus.

Thanks in advance for your help.

Dave Neumann
d.neumann@astronautics.com
0 Kudos
Message 1 of 3
(3,289 Views)
Hi Dave,

Here is a stab at answering your query.

This is probably going to envolve modifying your Process Model ie SequentialModel.seq. to achieve what you want to do.
So before you start -

If you do make changes to the process model. Then dont change the file in the Components\NI folder but copy it to a corresponding folders to the Components\User folder, then change this one.

In the ReportOptions you would put your code to obtain the previous log file. You would need to load the data from the file an store this in say a string variable in FileGlobals so that its available back in the process model. You will have to store the full path to that log file as well. Close the file before returning from the ReportOptions.

After the step 'Get Report Options' i
n the process model, you will need to determine if a new file or using a previous file.
About half way down the Test UUT sequence in the process model sequence file is a step 'Determine Report File Path'. This would have to be skipped. You could do your check to use previous log file here.
If a previous file then obtain the data and store into Locals.Report and also get the Path and store into Locals.ReportFilePath. If you use a new log file then do the step 'Determine Report File Path'.

Remember to modify all entry points in the process model sequence file. eg Test UUT's and Single Pass.


Hope this helps.
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 2 of 3
(3,289 Views)
Hi Dave,

Ignore the modifications to the process model ....

The standard TestStand set does already allow for appending to a previous report so long as you have the correct settings in the ReportOptions, i.e. Append, Dont make unique, Dont added the Time/Date to file name.

Therefore all you need to do is add your code in the Override ReportOptions sequence call to prompt of an existing report to set up the report path and whether you what to append or not.
This means you dont have to modify the process model.

What you will see at the end of the test sequence execution displayed for the Report is only the current runs, but all results will have been appended to previous result in the file and will be seen if the report is launched in the viewer.

R
egards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 3 of 3
(3,289 Views)