NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Visual Studio TestStand API runtime enable/disable XML reporting file creation

Solved!
Go to solution

I am looking for a Visual Studio C# solution to selectively disable creation of the report generation XML file using the TestStand API.

These XML files are useful for active troubleshooting for technicians, but wind up cluttering important directories with useless information most of the time.

 

I am aware that the XML file creation can be disabled through the TestStand Sequence Editor menu item Configure | Result Processing | Output Name Report | Enabled unchecked option.

This is helpful, but:

1. I have not found a way to check-uncheck this feature at runtime.

2. I do not believe that this would be an effective solution for my instal-less Base Deployment Paradigm.

 

Any help or ideas would be appreciated!

 

0 Kudos
Message 1 of 7
(6,307 Views)

Here is a general example of how to programmatically change the result processing configuration file. It is a sequence, but it should be straight forward to call the same TestStand API methods from .net

 

 If you breakpoint in the sequence after loading the file, you can expand Locals.ConfigFile to explore the property structure of the file.

Message 2 of 7
(6,297 Views)

Thank you for the quick and concise response James_Grey!

This is useful, complete, and implementable but not exactly what I was hoping for.

 

I was hoping to be able to enable/disable the XML file creation for the currently executing instance of the engine prior to sequence start.

I would rather not disable reporting through a configuration file that would effectively disable it for all uses of TestStand until it was re-enabled again.

Are my expectations unrealistic?

 

Does anyone have any idea how creation of the XML file can be enabled/disabled for an active instance of the engine prior to sequence start through the API without altering the file based configuration of TestStand?

 

I have seen some postings around 2008 that indicate this can be done, but I was unsuccessful implementing those solutions in TestStand 2013.

 

0 Kudos
Message 3 of 7
(6,260 Views)

You could create a ReportOptions callback sequence, either in your top level client sequence file, or in StationCallbacks.seq. In the callback you can set the value of Parameters.ReportOptions.DisableReportGeneration

0 Kudos
Message 4 of 7
(6,253 Views)

Thanks for the follow-up and the idea!

Unfortunately I still got an XML file after adding a ReportOptions callback to my sequence with DisableReportGeneration set to true.

0 Kudos
Message 5 of 7
(6,244 Views)
Solution
Accepted by topic author tempacheer

Here is an example that works for me. If I run it single pass with a report enabled, I don't get a report.

0 Kudos
Message 6 of 7
(6,220 Views)

Thanks for the clear example. I was not aware that the Parameter had to be set in a step execution in order to make the setting effective.

0 Kudos
Message 7 of 7
(6,211 Views)