NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmaticaly naming XML report

Hi all,
I am generating XML report after testing a product.
It is required to name the XML report generated programmatically. Like "[UUT Serial No][Model Number][Date][Time].XML"
How this can be achieved?
I am using Test stand 3.5.
Thanks in advance.
 
SajK
0 Kudos
Message 1 of 7
(3,779 Views)

Hey Sajk,

If you look in your process model you will see a step called Determine Report File Path.  This calls into the modelsupport2.dll and determines what to set Locals.ReportFilePath to based on the settings you have in Configure>>Report Options.  Locals.ReportFilePath is local to the entry point sequence of the process model you are calling. 

What you can do is, and this worked for me, just set that variable to whatever you want after the Determine Report File Path step but before the Write UUT Report step.  This is because the Write UUT Report step uses that variable to determine where to write the report.   The best thing is just to parse the Locals.ReportFilePath variable and insert what you want into the string before the .xml or .html or whatever report type you are using.  This will ensure that they can still use the process model with whatever report type they want.

Regards,

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

Hi Sam,

I believe the 'Determine Report File Path' also open the file as well.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 3 of 7
(3,766 Views)
Hi Sam,
Thanks for the reply.
What I understood is that, I need to customise the process model to be change the test report path programmatically.
Is it possible using call backs?
 
Regards
 
SajK
 
0 Kudos
Message 4 of 7
(3,718 Views)

Hi,

You can use the Callback ReportOptions to do that. Its input is the settings from the Configure Report Options dialog. You can then change the component parts or the whole path, depending on the settings contained in the container ReportOptions.

You can add this callback in your sequence file and therefore you dont have to touch the process model sequence file.

Hope this helps

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 5 of 7
(3,710 Views)
Hi Ray,
Thanks for the reply.
I am using Test UUT execution method, for carrying out the test.
Report options call back is executed before PreUUT call back.Model number and serial number entered by the user from the custom PreUUT call back is required for generating the test report file name.
 
Is there any other method I can try, rather than going for a custom process model?
 
Regards
 
SajK
0 Kudos
Message 6 of 7
(3,672 Views)

Hi SajK,

If you want a new report for the each UUT, you can select the "New UUT Report for Each UUT" in the Configure >> Report Options dialog under the Report File Pathname tab. Of course, this doesn't handle the Model number for you.

Generally, our suggestion follows along with what Sam recommended earlier. If you are concerned about directly modifying the process model, you could always add your own callback to the process model and then modify it. While you are still modifying the process model, you can limit your modifications to Test UUT sequence.

Regards,

Matt M.
NI

0 Kudos
Message 7 of 7
(3,644 Views)