09-06-2022 06:01 AM
Hi All,
I am generating teststand report file in a new folder for every run using the specify path by expression option in the result processing window. I used this expression "\\$(ClientFileName)_Report[$(FileTime)][$(FileDate)]"+"\\$(ClientFileName)_Report[$(FileTime)][$(FileDate)].$(FileExtension)" to set the path.
I was trying to get this report file location during runtime so that i could save some other files in this folder.
I checked RunState.Report.Location, Parameters.ReportOptions.Directory but are empty while run time.
GetReportFilePath call back gives the correct path but it is executed at the end of sequence execution.
How can i get this path in the main sequence?
09-06-2022 08:59 AM
Have you tried RunState.Root.Locals.ModelPluginConfiguration.Plugins[0].PluginSpecific.RuntimeVariables.UUTReportFilePath?
Where Plugins[0] refers to the appropriate result processing plugin
The value is written here
09-06-2022 10:39 AM
09-07-2022 08:35 AM
I think Oli was close, try:
RunState.Root.Locals.ModelPluginConfiguration.Plugins[0].PluginSpecific.RuntimeVariables.PerSocket[0].Path
This should be filled at the beginning of the MainSequence.
I'm assuming if you have multiple TestSockets, ...PerSocket[Runstate.TestSockets.MyIndex].Path should be used?
Stefan
09-09-2022 01:06 AM
Hi kghzvi,
This did not work.
The persocket[0] section is always empty.
I tried writing this value o a local using a statement but it gives unknown variable error.
09-09-2022 01:21 AM
Are you using an unmodified NI process modell with an unmodifier report generation plugin?
Are the reports actually created during your tests (so report generation correctly enabled, etc...)?
For debugging, the best way would be to set a breakpoint in the beginning of your MainSequence, and then opening up the variable tree and going down the path I described.
It should look like this:
Stefan
09-09-2022 06:36 AM - edited 09-09-2022 06:44 AM
Hi kghzvi,
Yes, I am using an unmodified NI process model with an unmodified report generation plugin
I followed the same way to check this on the variable window but I could not see this in NI TestStand 2019.
Are you using 2020 version?
09-09-2022 06:50 AM
Yes I am using TestStand 2020.
Unfortunately I do not have TS 2019 available.
Stefan
09-13-2022 08:31 AM - edited 09-13-2022 09:13 AM
I can confirm that in 2019, the variable seems to be empty.
Couldn't find the time today to check why that is.
Re-Edit: in TestStand 2019, the report file path is calculated in the UUT Done part of the Report Plugin, so it is undefined during client sequence execution 😯
09-26-2022 12:51 AM
This is interesting because after double checking, the report path variable is filled in the UUT Start part of the report plugin in TestStand 2020 (so prior to the MainSequence call).
Stefan