NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Built in viewer not displaying XML report

we are working on a test system that was originally developed elsewhere, using TestStand 4.0. It is generating XML report files, but not using the default NI schema, instead using both it's own 'custom' schema and reportgen sequence file for the report formatting. When it was running in TS 4.0, it all appeared to operate correctly, i.e. once the execution had come to an end, the built in TS viewer showed the XML file formatted correctly as defined in the XSL file.

For a variety of reasons, we have needed to upgrade to TS 4.2.1, and as a result, the built in report viewer no longer displays the XML report at teh end of an execution. Instead, it shows an error ...

 

'The XML page cannot be displayed

Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.

 

XML document must have a top level element. Error processing resource 'file:///C:/<file_path>/TempReport.xml'

 

Looking in the <file_path>, there is a TempReport.xml file, which is empty, hence the error message, but there is also the correct xml file, with data in. Clicking on the 'Viewer' button in the built in report viewer kicks off IE, which correctly shows the saved report file, complete with the formatting as defined in the xsl file, so it would appear that the custom reportgen sequence is still doing it's job correctly, just that the built in viewer has a problem... (Incidentally, if you try to refresh the viewer, as suggested in the error message, it brings back the same error, but repetatively creates a new TempReport file, with a number appended...)

I've traced through the sequence model (this is the default model) and the tempReport file is only created when the sequence model finishes, (In fact checking the value of the Locals.ReportFilePath variable right at the end of the sequence model shows the correct filename...) suggesting that it is not a sequence problem, but rather something built into TS? (I saw some comment on another forum entry suggesting that a temp file is created when using IE as an external viewer, to prevent a memory leak)

 

Realistically this is not a major problem, but it has got to the level of annoying now, having to open an external viewer even though the built in one is loaded by default... I'm guessing that the built in viewer is just a simple browser? if so, why is it being passed the wrong file/creating an empty xml file. If I set the report back to standard xml, I see the report ok, but without the formatting.

 

It seems odd that this breaks in TS 4.2.1 but works fine in 4.0, when TS is meant to be backwardsly compatible 😉

 

Any ideas would be gratefully received...

0 Kudos
Message 1 of 4
(3,535 Views)

 

Slaine,

 

There is a known issue in TS 4.2 or later, with the reportView control showing an empty report if the Report.StylesheetPath is not set.

 

In the default Sequential Process Model (Test UUTs and Single Pass Entry Points), this is done in the sequence called from Setup Report Dispaly Settings step.

Can you try setting the Report.StylesheetPath in the process model to see if this resolves your issue. 

 

 

Regards

 

Anand Jain

National Instruments

0 Kudos
Message 2 of 4
(3,502 Views)

Thanks for the suggestion Anand... As it turns out, you were very nearly right. It turned out that it wasn't actually the stylesheet path that was causing the error, but instead the original developers had over-ridden the use of the standard NI xml report handler sequence to use one of their own, by setting the ReportOptions.format to a different name from xml. In the Setup Reports Display sequence call (uses a sequence in the modelsupport.seq file) there was a pre-condition on the format name, and as it no longer contained just xml, the precondition failed, and the sequence call that sets up temporary paths etc. never ran. I added an additional precondition state, to check for either xml, or the format used in this case, and everything sprung back into action. I'm not sure whether something similar was done previously in TS 4.0...

 

Is there a list of these known problems in TS 4.2.1? I did look around the NI site a bit before posting the initial question, and didn't see anything that seemed to detail this...

 

Once again, thanks for your assistance

0 Kudos
Message 3 of 4
(3,481 Views)

Slaine -

 

Generally, we try to keep an up to date list of Known Issues on ni.com. You can access this list on the TestStand 4.2.x Known Issues page. I don't believe this particular issue has been added to the list yet as we have not gone through our update cycle yet, but it will be added in the next update of the Known Issues page.

 

Hope this helps.

Manooch H.
National Instruments
0 Kudos
Message 4 of 4
(3,461 Views)