10-04-2007 05:19 AM
10-04-2007 04:56 PM
10-05-2007 03:27 PM
I do this very thing. I create a special format for the report file name with Pass or Fail (or Error or Termanated) at the end of the file name. By setting the report options just right reuses the same report file name when it creates it before the test are run. Then after the test is run in the TestReport callback I set the ReportFilePath with the file name that I want based on the test results.
RunState.Root.Locals.ReportFilePath =
Parameters.ReportOptions.Directory + "\\" +
Parameters.ReportOptions.BaseName +
Parameters.UUT.SerialNumber + "_" +
Str(Parameters.StartDate.Year,"%04d") +
Str(Parameters.StartDate.Month,"%02d") +
Str(Parameters.StartDate.MonthDay,"%02d") + "_" +
Str(Parameters.StartTime.Hours,"%02d") +
Str(Parameters.StartTime.Minutes,"%02d") +
Str(Parameters.StartTime.Seconds,"%02d") + "_" +
Parameters.MainSequenceResults.Status + ".xml"
I only have a single empty report file that is not used, but I get all the report files with names based on the test result.
Now to prevent someone changing the report options
10-05-2007 03:42 PM
Sorry clicked before I was done
I do this very thing. I create a special format for the report file name with Pass or Fail (or Error or Terminated) at the end of the file name. By setting the report options just right reuses the same report file name when it creates it before the test are run. Then after the test is run in the TestReport callback I set the ReportFilePath with the file name that I want based on the test results.
In the ReportOption call back I set the report options.
Parameters.ReportOptions.GeneratePath = False
Parameters.ReportOptions.NewFileNameForEachUUT = True
Parameters.ReportOptions.AppendToFileIfItExists = False
Parameters.ReportOptions.DirectoryType = "SpecificDirectory"
Parameters.ReportOptions.Directory = { To What ever Directory you need }
Parameters.ReportOptions.BaseName =
Right( RunState.ProcessModelClient.Path , Len( RunState.ProcessModelClient.Path ) - Find( RunState.ProcessModelClient.Path , "\\" , 0 , True , True ) -1 ) ,
Parameters.ReportOptions.BaseName =
Left( Parameters.ReportOptions.BaseName , Find( Parameters.ReportOptions.BaseName , "." , 0 , True , True ) ) + "_"
Parameters.ReportOptions.ReportFilePath = Parameters.ReportOptions.Directory + "\\"
Parameters.ReportOptions.UseFormatForExtension = True
Parameters.ReportOptions.DisableReportGeneration = False
Then in the TestReport callback I rename the ReportFilePath
RunState.Root.Locals.ReportFilePath =
Parameters.ReportOptions.Directory + "\\" +
Parameters.ReportOptions.BaseName +
Parameters.UUT.SerialNumber + "_" +
Str(Parameters.StartDate.Year,"%04d") +
Str(Parameters.StartDate.Month,"%02d") +
Str(Parameters.StartDate.MonthDay,"%02d") + "_" +
Str(Parameters.StartTime.Hours,"%02d") +
Str(Parameters.StartTime.Minutes,"%02d") +
Str(Parameters.StartTime.Seconds,"%02d") + "_" +
Parameters.MainSequenceResults.Status + ".xml"
This gives report files like
My_TestSequence_1234_20070728_200018_Failed.xml
My_TestSequence_1234_20070728_200018_Passed.xml
Jim D.
10-08-2007 03:56 AM
Hi,
Thanks for the suggestions. I have used the Process clean up where I call a VI to copy the current report file (from Runtime.Root.Locals.Reportfilepath) to the required name with status information from Runtime.Root.Locals. Results[0].Status.
In the VI I manupulate the file name to my requirement and use it as the destination parameter for copy file VI. Then I delete the report file generated by teststand.
This works fine for the current requirement.
Regards
Gopal
06-05-2009
09:59 AM
- last edited on
10-30-2024
04:06 PM
by
Content Cleaner
In reponse to Gopal's original question of appending the result of a UUT to the Report File Path,
TestStand 4.2 gives you the ability to specify the report path using Expressions as well right from the Report Options dialog box. For instance, using the
<UUTStatus> macro, you could specify that reports for UUTs that Pass versus those that Fail go to different locations.
For more information on this, refer to:
NI TestStand Help: Specifying Report File Paths by Expression
NI TestStand 4.2 Release Notes: Using Expressions to Customize Report File Paths
10-01-2020 02:56 AM
Hi OmarGator..
It’s a very old post but I’m stuck with the same issue. 🤔
Filled the ReportOption callback, and the TestReport callback as suggested.
But I’m a bit puzzled.
In the ReportOption callback the variable RunState.ProcessModelClient.Path is not known,
and in the TestReport callback the variable Parameters.MainSequenceResults.Status is not known.
Can you help me with the details to get it running ?. A great help will be a example sequence file.
Thanks a million.. 😊