NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Modify "Number of Results" in Report

Solved!
Go to solution

Hi,

 

I have a sequence in which some steps are skipped. After executing the sequence, the report (TR5_Horizontal.xsl) is generated. The Report header shows the "Number of Results" field.
The problem is that "Number of Results" is the total number of steps in the sequence. But for me it would be more logical if the number of executed steps without the skipped steps were displayed .

Is there any way to modify "Number of Results" accordingly?

 

Thanks for your help in advance ...

 

Sven

0 Kudos
Message 1 of 4
(2,157 Views)
Solution
Accepted by topic author SSchierz

You have to change your mindset a little bit to realize that reporting in TestStand is made up of 2 parts: Result Collection and Result Processing.

 

Result Collection is the part where TestStand collects all of the results.  This is done as your sequence file executes.  In MainSequence there is a Locals.ResultList variable that is basically an array of results.  As the sequence executes it puts step results in there.  Those are then passed back to the process model.

 

Result Processing is the part of TestStand that occurs in Plugins  Plugins takes the result list from MainSequence and then traverses the results and decides what to do with the results.  Depending on which Plugin you are using you can filter the result list for different things.  The out-of-box Plugin uses a whole bunch of options to determine if the result should go on the report or not.  These can be found in the Report Options dialog.  For instance in the Report Options on the Contents tab there is a Result Filtering Expression that allows you to determine which results to place in the report or not.  One option is to exclude Passed/Done/Skipped steps.  This would yield a report with only failed, errored or terminated steps.  You can actually place Result.Status != "Skipped" in that box as well and it will not place skipped steps on the report.  As you can see there is a lot of flexibility with this.

 

So basically you have several options:

  1. Do as I say above and change the result filtering expression
  2. When you skip a step also change the result recording to disabled for that step.  This will disallow the result from being placed in the result collection to begin with
  3. Create your own plugin to ignore skipped steps
  4. Use a ResultListEntry callback somewhere to throw skipped steps away before they get put in the result list

 

The key is picking your poison.

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 4
(2,141 Views)

To directly answer your question about the "Number of Results" display.  I haven't dove into the Plugin code but my guess is that there is some sort of ticker/count that occurs every time a result is placed in the report.  This is then placed in the "Number of Results" display. 

 

If you don't want to filter your results then you would need to change the Plugin to count differently or change the style sheet if using XML to display something else.

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

Hi jigg,

 

Thank you for your detailed explanation.

 

I used point 2 in your explanation. Sometimes you do not see the obvious solution ...Smiley Happy

 

But I do not want to manually change the "Resul Recording" option when skipping with each time, so I also used Charlie's tip Programmatically disable result recording for skipped Steps or sequence calls to automatically change the "Resul Recording" option.

 

Thanks again ...

 

Sven

0 Kudos
Message 4 of 4
(2,124 Views)