NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

teststand xml schema, only show error and failing tests

During run-in and debugging I am using xml logging in TestStand.

My reports are quite large due to a high amount of debug information.

For the most, I am only really interested in the tests that failed - and it takes a long time to go throught the reports to finde the failing tests (when many are failing).

This is especially true since I am running in Batch mode and have 4 parallel sockets.

 

Does anyone have a schema like horizontal.xsl, but with the addition of only showing tests that failed or errored (and of cause the header with socket/date/time/SN and so on)?

 

Hope someone has a solution to this, since looking through 4MB xml files is quite time consuming.

 

Regards,

Simon

0 Kudos
Message 1 of 5
(3,893 Views)

Couple questions:

 

Do you still want the xml to contain all steps that reported? And the stylesheet just shows the failed steps?

 

OR

 

Do you want the xml to only contain failed steps?

 

Are you using On The Fly reporting?

 

If you aren't using On The Fly then you can simply add the SequenceFilePostResultListEntry callback and put a statement step in there with the following:

Parameters.DiscardResult = (Parameters.Result.Status != "Failed")

 

This will discard all steps from the result list except the failed ones.

 

Hope this helps,

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

Thanks for the response!

 

I have a few coments/replies:

 

I would like the xml to contain all data, and the style sheet to only show fail and error steps.

In this way I could use the default scema for viewing the entire xml, and a different schema if I i want to only see error and fail steps.

 

I am not using on the fly reporting.

 

I like your suggestion of only including failed results, but that would limit my later analysis since I would not have logged information from passed steps - this information may be usefull in later analysis.

 

Regards,

Simon

0 Kudos
Message 3 of 5
(3,864 Views)

Hi Simon,

 

The TestStand help provides many examples for modifying the XML stylesheets.  The example below demonstrates how to filter results based on a property value:

 

Excluding Results from XML Reports Based on Step Properties

 

By using this method, all of your results will still be logged to the XML report, they will just not be displayed when viewing it.

 

Other examples of modifying the XML stylesheets can be found here:

 

Customizing XML Report Style Sheets

 

Let me know if you have any issues using the example!

Al B.
Staff Software Engineer - TestStand
CTA/CLD
Message 4 of 5
(3,847 Views)

Hi AI.B

 

That was just what I was looking for!

 

I made the following changes:

 

<xsl:variable name="gEnableResultFiltering">0</xsl:variable>

 

Replaced with:

 

<xsl:variable name="gEnableResultFiltering">1</xsl:variable>

 

-0-0-0-0-0-

 

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

return true;
else
return false;

Replace with:

 

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

if (filteringCondition.text == 'Failed' || filteringCondition.text == 'Error')

return true;
else
return false;

 

/Simon

Message 5 of 5
(3,832 Views)