Excluding Results from an XML Report Based on Step Properties

TestStand 2017 Help

Edition Date: November 2017

Part Number: 370052W-01

»View Product Info

Download Help (Windows Only)
NI TestStand 2014 Help
NI TestStand 2014 SP1 Help
TestStand 2016 Help
TestStand 2016 SP1 Help
TestStand 2017 Help

Complete the following steps to exclude results of specific steps based on step properties.

  1. Open the .xsl file you want to change.
  2. Search for the XSLT variable gEnableResultFiltering.
  3. Set the variable to 1 to enable result filtering. You can set the variable to 0 to disable result filtering.
  4. Search for the string ADD_STEP_FILTERING_CONDITION.

    The filtering condition in the style sheets includes two expressions. The first expression defines an XPath expression for the filter condition. The second expression performs the filtering based on the filter condition. The style sheets include the following expressions to include only Passed steps in the report:

    filteringCondition = node.selectSingleNode("Prop[@Name='Status']/Value");
    if (filteringCondition.text == 'Passed')

    Refer to the World Wide Web Consortium (W3C) website, located at www.w3.org, for more information about XPath.

The node you pass in as a parameter to the CheckIfStepSatisfiesFilteringCondition_node function corresponds to the <TEResult> node of the step. The report does not include steps under a Sequence Call step when the Sequence Call step itself does not meet the filtering conditions. The report always includes the result of the MainSequence callback step, even if the step does not meet the filtering conditions you set. To include all the steps in a sequence file that satisfy the filtering condition, use a condition to check Sequence Call step types regardless of step status.

Use the following code to exclude Skipped steps:

var filteringCondition = node.selectSingleNode("Prop[@Name='Status']/Value");
if (filteringCondition.text != 'Skipped')

Use the following code to include only Sequence Call steps or Passed or Done steps:

var filteringCondition = node.selectSingleNode("Prop[@Name='Status']/Value");
var stepTypeCondition = node.selectSingleNode("Prop[@Name = 'TS']/Prop[@Name = 'StepType']/Value");
var stepTypeConditionString;

if (stepTypeCondition)
     stepTypeConditionString = stepTypeCondition.text; else
stepTypeConditionString = 'SequenceCall'; //To handle psuedosequencecall steps

if ((filteringCondition.text == 'Passed' || filteringCondition.text == 'Done') || stepTypeConditionString == 'SequenceCall')

horizontal.xsl

The following figure shows a filtered report using horizontal.xsl:

Filtered Report Using horizontal.xsl

report.xsl

The following figure shows a filtered report using report.xsl:

Filtered Report Using report.xsl

expand.xsl

The following figure shows a filtered report using expand.xsl:

Filtered Report Using expand.xsl

WAS THIS ARTICLE HELPFUL?

Not Helpful