NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Different Report options for different sequences

Hello community,

 

We have developed a test station capable to test several different products for our customer. So far we used XML as a report format (using the standard Report Options dialog in TestStand). Our issue is that our customer wants to change this and we should start having different report options for some of the sequences (Some HTML and some XML), but the Report Options dialog really seems to be tied to a station and not to the sequence files meaning that if I change the report options than it changes the report format for ALL the sequences running on that station.

 

Is there a workaround?

 

thx!

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

Hi,

 

Check if you are fine with this approach.

In results configuration add one more report.

 

RaviShrigiri_1-1655809367967.png

 

When you select the more options flag there are tools present in the right hand side.

Add one more report type.

Set one for HTML and other for XML.

When tests are executed both reports will get generated .let user take whatever they want.

 

Yes there is small delay involved but if it doesnt matter then you can take this approach.

 

Ravi

 

0 Kudos
Message 2 of 6
(1,291 Views)

hmmm... this would certainly work and a lot better than nothing, thanks. Still wondering though these could be disabled programmatically or if we really need to generate all reports. Actually I dont even understand at why these are global settings and not sequence file specific.

0 Kudos
Message 3 of 6
(1,287 Views)

A super convoluted way could be to iterate thru RunState.Sequence.Locals.ModelPluginConfiguration.Plugins, find the element in which the RunState.Sequence.Locals.ModelPluginConfiguration.Plugins.<element>.PluginSpecific.Base.DisplayNameExpression is the one you want to enable and then set the RunState.Sequence.Locals.ModelPluginConfiguration.Plugins.<element>.PluginSpecific.Options.DisableReportGeneration boolean to False, while for everything else you should set this variable to True.

 

Which would be a mediocre solution cause if you have database logging then for that one you dont want to do that and there could be other exceptions as well.

 

Even if you do this then the applicable Report options are hidden in your sequence file instead of being easily accessible via the menus.

 

I'm wondering why an earth such an easy looking problem can't be solved in an easy way, cause man even JC would have a problem figuring all these out on his own. 😛

Message 4 of 6
(1,282 Views)

Hi,

If you want to do  it programmatically :

Add two reports as shown earlier.

 

Add report options callback sequence :

RaviShrigiri_0-1655810844148.png

 

In the report options callback go to parameters and based on the report type you can enable or disable it.

Both the variables of interest are marked during runtime below :

 

RaviShrigiri_1-1655810930294.png

Note this callback will be called twice since two reports are chosen.

Based on the report type you can make the disable flag false or true.

 

But you need to add this to all your sequences and all the test systems should be configured for dual reports.

Ravi

 

 

0 Kudos
Message 5 of 6
(1,280 Views)

For the sake of completeness, I should add that you can implement the ModelPluginConfiguration callback in a sequence file. It gives access to the complete list of configured plugins. You can delete from or add items to this list in the callback, getting the same control you have in the Result Processing Configuration Dialog, except programmatically. 

 

An easy way to get an entry to programmatically insert is to first configure it in the dialog, then breakpoint in this callback and copy it to the clipboard (it will be an element in the Parameters.ModelPluginConfiguration.Plugins array). Then terminate and paste it as a local in the callback sequence and add a statement to the callback to copy it into the Plugins array at runtime.  You can then delete the entry from the dialog.

0 Kudos
Message 6 of 6
(1,267 Views)