NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Report File Path location at execution in TestStand 2012 and later

I need to include PNG pictures into my TestStand Report (HTML, XML, ATML).

 

When report generation was made through plugins (before TestStand 2012), it was easy to get report file location during execution through variable RunState.Root.Locals.ReportFilePath in order to save PNG files near the report file (in same directory).

 

I didn't find yet an easy an simple way to do the same in TestStand 2012 with Result Processing Plugins.

Any idea ?

 

Remarks :

  • Since this functionnality has to be included within MESULOG TS+ last version which is a TestStand Add-on, I cannot modify Report Options, Process Model or include a callback (like GetReportFilePath.
  • In need ReportFilePath within a Custom Step Type which cannot wait for PostUUT or ReportGeneration to save its PNG files.

Jean-Louis SCHRICKE
CTA - Certified TestStand Architect (2008 - 2022)
CTD - Certified TestStand Developer (2004 & 2007)
CLD - Certified LabVIEW Developer (2003 & 2005)

0 Kudos
Message 1 of 9
(7,180 Views)

RunState.Root.Locals.ModelPluginConfiguration.Plugins[<plugin index>].PluginSpecific.Options.Directory

 

Basically because everything is in plugins now you need to go through the plugin configuration property.

 

Hope this helps,

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

You should be careful using this as some plugins don't have this subproperty defined.  You can use the PropertyExists function in those cases.

 

Regards,

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

jiggawax,

 

Thank you for you quick answer.

 

RunState.Root.Locals.ModelPluginConfiguration.Plugins[<plugin index>].PluginSpecific.Options.Directory is valid only if  

RunState.Root.Locals.ModelPluginConfiguration.Plugins[<plugin index>].PluginSpecific.Options.DirectoryType is set to "SpecificDirectory".

 

It seems that I cannot get the complete ReportFilePath before "UUT Done" plugin entry which is after MainSequence execution.

Jean-Louis SCHRICKE
CTA - Certified TestStand Architect (2008 - 2022)
CTD - Certified TestStand Developer (2004 & 2007)
CLD - Certified LabVIEW Developer (2003 & 2005)

0 Kudos
Message 4 of 9
(7,154 Views)

I investigated further and may be I found a solution to my problem :

 

The variable i am looking for is :

RunState.Root.Locals.ModelPluginConfiguration.Plugins[<plugin index>].PluginSpecific.RuntimeVariables.PerSocket[<socket index>].Path

and is calculated at beginning of execution (Model Plugin - UUT Start).

Jean-Louis SCHRICKE
CTA - Certified TestStand Architect (2008 - 2022)
CTD - Certified TestStand Developer (2004 & 2007)
CLD - Certified LabVIEW Developer (2003 & 2005)

Message 5 of 9
(7,146 Views)

Glad you found what you wanted. That's great.

 

Be aware that the plugin index can change depending on which plugins are turned on or off in the result processing dialog.  As well, I mentioned before, some plugins do not define that specific variable that you are going for.  So you'll have to write some code to account for that.

 

Regards,

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

Hi all,

 

I need in a .net code module the report path.

Depending on process model, ModelPluginConfiguration is not located at the same place : 

- sequential model : RunState.Root.Locals.ModelPluginConfiguration.Plugins

- Parallel model : RunState.Root.Parameters.ModelPluginConfiguration.Plugins

 

After that, I take the first plugin which is enable (in "Base.Enabled" property) and I use "PluginSpecific.RuntimeVariables.PerSocket[MySocket].Path

 

Stop me if I make a mistake. Thanks

0 Kudos
Message 7 of 9
(3,995 Views)

Still cannot understand your solution.. In which sequence I use statement:

RunState.Root.Locals.ModelPluginConfiguration.Plugins[<plugin index>].PluginSpecific.RuntimeVariables.PerSocket[<socket index>].Path

I'm using parallel model.

0 Kudos
Message 8 of 9
(3,763 Views)

My team had better luck with the following path based on Jean-Louis's solution

RunState.Root.Parameters.ModelPluginConfiguration.Plugins[<plugin index>].PluginSpecific.RuntimeVariables.PerSocket[<socket index>].Path

Steven Dusing
CLA, CTA
Message 9 of 9
(2,963 Views)