NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set the UUTSTatus of a report in the callback "ReportOptions"?

Solved!
Go to solution

I simply would like to add to the report name the UUTStatus like "passed" or "failed". I was able to set in the callback ReportOptions the reportpath but unfortunately I can't find the 

way to add to the basename the UUTStatus.

 

 

My reportname looks like this:                      Report DUT[11 49 12][06 04 2023].xml

And I would like to get this:                          Report DUT[11 49 12][06 04 2023] passed.xml

 

 

How can I do that?

 

Thanks

0 Kudos
Message 1 of 7
(719 Views)
Solution
Accepted by topic author Norick17

Hi,

 

I tried this method and was able to generate html file in the way you wanted.You can try it for the XML also in the same way.

RaviShrigiri_0-1681058846670.png

 

This is what i tried  for 2021 32 bit TS:

Open C:\Program Files (x86)\National Instruments\TestStand 2021\Components\Models\ModelPlugins\NI_ReportGenerator.seq

 

Go to "Model Plugin - UUT Done" sub sequence

Add a statement as below to modify the report path :

" Locals.tempStr= SearchAndReplace(Locals.ReportPath,".html",Parameters.UUTStatus+".html",0),
Locals.ReportPath=Locals.tempStr"

 

You need to modify the locals.report path to meet your requirements.

The UUT status will be parameters.UUTstatus.

 

The above code changes the path from :

Sequence File 1_Report[22 14 28][09-04-2023].html

to

Sequence File 1_Report[22 14 28][09-04-2023]Passed.html

 

Do try this.

Ravi

 

 

0 Kudos
Message 2 of 7
(700 Views)

Hello Ravi

your solution works! Thanks for your reply...

 

One more question about it: Where can I add the TestSocket number? Do I need to add it in the ReportOptions callback or...? Unfortunately I can not find it.

 

Thanks

0 Kudos
Message 3 of 7
(668 Views)

Hi,

I did not get your requirement.Can you share more details.

 

You can always add additional data to a report by using the additional results step type.In this step type you can choose the variable you want to add.You can add this in your main sequence itself.

 

If you meant the currently running thread in a mutli socket/parallel testing then you add runstate.TestSockets.myindex

 

Ravi

0 Kudos
Message 4 of 7
(666 Views)

Hello

I think I found the solution for the TestSocket number:

 

In the callback ReportOptions you can modify the parameter Parameters.ReportOptions.UseSequenceFileNameAsPrefix = True

in order to add the TestSocket number to the report.

 

 

Thanks

0 Kudos
Message 5 of 7
(658 Views)

The only thing I have to mention about your solution is, that on the created .xml report the link for the UUT Serial number in the batch report are not working anymore. This is because you add manually the "UUTStatus" to the report and therefore the links inside the report are broken because of the wrong path name.

0 Kudos
Message 6 of 7
(655 Views)

Hello 

when I use your solution for .xml and .pdf reports, I can change the report path and add the UUTStatus but then the "old" report is also stored.

 

 

"report xyz Passed.xml"

"report xyz.xml"

 

Is there a way to delete the "old" report?

 

0 Kudos
Message 7 of 7
(617 Views)