NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Customizing ATML report header

Solved!
Go to solution

I need to add some rows to the UUT report header table, as explained in the following article for the 'horizontal.xsl' file: http://zone.ni.com/reference/en-XX/help/370052H-01/tssuppref/infotopics/custom_uutreport_header/

This works great for XML reports, but I need to do this in ATML report - have to modify 'TR5_Horizontal.xsl' file, but unfortunately the same method doesn't work in this case ('TR5_Horizontal.xsl' file's structure is different).

The values that I have to add to the header table are from ModifyReportHeader callback.

I use TS 2012 (5.0.0.252).

I'll appreciate any assistance on this issue.

Roman

 

 

0 Kudos
Message 1 of 16
(7,008 Views)

Roman,
The process for modifying the ATML stylesheet is outlined in the following Help document:

TestStand 2012 Help: Customizing the UUT Report Header for an ATML Test Results 2.02 Report

For more information on the ATML report structure, see:

KnowledgeBase 4SB7G6CK: TestStand XML Report Customization

Jared A.
Applications Engineer
National Instruments
Message 2 of 16
(6,980 Views)

Jared,

Thanks for the solution!

The only issue that remains not very clear for me is the customization of the XPath expression to match the data I want to add to the additional rows. I'll try to understand this from the W3C website, however it is a little bit complicated for those who are not familiar with XML...

I'd be happy to get any hints regarding the customization, maybe a link to a more specific chapter to read on the W3C website or some explanation about the XPath expression given in the example ("n1:ResultSet/@ID"). The data I need to add to the additional row is defined in ModifyReportHeader callback.

Roman

0 Kudos
Message 3 of 16
(6,872 Views)

Roman,

 

w3schools: XPath Syntax has some good details and examples. Have you taken a look at this?

Jared A.
Applications Engineer
National Instruments
Message 4 of 16
(6,831 Views)

Jared,

Thank you for the link. I've read the XPath Tutorial given there, it is very clear and understandable. However, this is general information about XML systax + general examples.

The information that I need is specific to TestStand: once I understand the syntax of XPath, how can I now build an XPath to display the values that I need? What are the nodes that store the information that I define as parameters in ModifyReportHeader? Should I now explore the entire TR5_Horizontal.xsl or TR_Horizontal.xsl file trying to understand this? Where can I find this information? I've read the Help chapter about ATML reports style sheets and ATML reports customizations, but I haven't find anywhere any hint regarding XPaths in TestStand 2012. All the articles refer to the W3C website to learn about XPath, but don't give any specific information - which nodes store the user-specified parameters defined in user's plug-in sequence (one of the new features in TestStand 2012) used to customize the report.

To be clear: I add the new values to be dispayed to ReportHeader parameter as described here (document ID: 5ADH53GU):

http://digital.ni.com/public.nsf/websearch/17ABBD0BF2A60D908625774200798869?opendocument

This works fine for XML report type (I tried it myself), but doesn't work for ATML report type.

Hope that now my problem is well-defined.

Thanks again!

Roman

 

0 Kudos
Message 5 of 16
(6,801 Views)

Roman,

The link posted above (TestStand 2012 Help: Customizing the UUT Report Header for an ATML Test Results 2.02 Report) contains a description for the "n1:ResultSet/@ID" expression:

 

The expression "n1:ResultSet/@ID" specifies the XPath expression to obtain the result set ID from the XML file. You must customize the XPath expression to match the data you want to add to the additional rows. Refer to the World Wide Web Consortium (W3C) website, located at www.w3.org, for more information about XPath.

 

 

More information on ATML and TestStand (including links to the schema) can be found at the following White Paper: ATML – The Standard for Interfacing Test System Components Using XML

 

ATML is an IEEE specification that TestStand uses. More information on the ATML structure can be found at http://grouper.ieee.org/groups/scc20/tii/

Jared A.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 16
(6,765 Views)

Jared,

I read that description for the "n1:ResultSet/@ID" expression given in the article. It only says: "Ok, this is XPath expression, you have to change it in order to insert your data in the ATML report's header, so go to W3C website and search for information". The links you've provided give only general information, and W3C don't have TestStand-specific information about XPaths. We talk about customization, that's why I'd expect from a help article to give an example showing how to add a CUSTOM value to the report's header and how to build an XPath expression for a CUSTOM value. This link (TestStand 2012 Help: Customizing the UUT Report Header for an ATML Test Results 2.02 Report) gives an example that adds a built-in TestStand parameter hidden somewhere, this is not a custom value. I've learned that one can add any custom value to the report header in the ModifyReportHeader callback, and then modify the .xsl file in order to show that value in the report. The example in document ID: 5ADH53GU explains how to modify the .xsl file for XML report only, the same method, unfortunately, doesn't work for ATML report.

0 Kudos
Message 7 of 16
(6,756 Views)

Roman,
Because TestStand does not use the same traditional report generation for ATML that XML and HTML do, it can be a little more work to accomplish what you are trying to do.


I understand that you are trying to add to the report header, but I did want to make it known that you can add additional information to an individual step by utilizing the Additional Results step property.


1.png


Adding information to the ATML report can be accomplished most easily by modifying the TestStand sequence that actually creates the ATML report. Once we get the information into the report, then we just have to make a slight modification to the ATML stylesheet to ensure we actually display this information.


1. The .seq file that creates ATML reports can be found at <Program Files>\National Instruments\TestStand 2012\Components\Models\TestStandModels\reportgen_atml.seq
2. Make a backup of any files here that you modify. This will help in case you need to restore them to the original later.
3. Open reportgen_atml.seq in TestStand.


2.png


4. Look through these steps to get an idea of what is happening here. Particularly the steps inside the If...Else construct.


5. To modify the header, you will probably want to look inside the following sequence: AddReportHeader


3.png


6. The Add Report Element step shows how to add an additional line to the ATML header.


I know this is not a full step-by-step guide, but hopefully this explains the ATML reporting and helps you get started.

Jared A.
Applications Engineer
National Instruments
Message 8 of 16
(6,744 Views)
Solution
Accepted by topic author roman_beacon

Jared,

 

After analysing the TS sequence that generates ATML report and the TR5_Horizontal.xsl + report xml files, I've finally found a solution that works well.

 

Here it is:

 

1. Add the following expression to ModifyReportHeader Callback in your sequence (in this example I want to add a software version number to the header table):

Parameters.ReportHeader +="\t<tr:SWversion>\n\t\t<tr:Number value = \""+StationGlobals.SWversion+"\" />\n\t</tr:SWversion>\n"

StationGlobals.SWversion is the custom value that will be added to the report header.

2. Modify the TR5_Horizontal.xsl stylesheet (for ATML 5).  Add the following rows into <table class="uutTable"> after the SerialNumber (if you want the custom value to be shown after the serial number's row):

<tr>
  <td style="font-weight:bold;">SW version</td>
  <td>
  <xsl:value-of select="tr:ResultSet/tr:SWversion/tr:Number/@value" />
  </td>

</tr>
 
Thank you for your assistance! Hope that my solution will also help someone else.

 

Roman

Message 9 of 16
(6,696 Views)

Roman,

Thanks for your response! Glad to hear you got this working.

Jared A.
Applications Engineer
National Instruments
0 Kudos
Message 10 of 16
(6,681 Views)