NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems creating multiple test reports in TestStand 4.1.1

Solved!
Go to solution


We're running TestStand 4.1.1 and LabVIEW 8.6.1.  We have an extensive repository of production tests and fixtures, with a lot of code sharing and the like.  We build deployments and installers of all of our tests nightly with an automated build server.  We have newer versions of TestStand and LabVIEW, but because of bugs in TestStand's deployment (and installer building) process, we can't use them with our sequences/projects/workspaces.


We have traditionally been configured for test reports in html format, since it's easy to view the reports not only on the test fixture, but on any other platform.  The problem with this is that the html reports are difficult to parse programmatically.  For that, you really want the xml report format.  The problem with this is that the xml reports require a style sheet, and the only viewer we have gotten to work is Internet Explorer.  It's not very portable, especially across platforms.

So we got the mandate to produce the test reports in both formats.  I found a thread here describing how to do this in TestStand 3.5.1, and began with the updated sequence model posted in that thread.


http://forums.ni.com/t5/NI-TestStand/Create-Two-TS3-5-Reports-XML-and-ATML/td-p/471394/page/2

 

I need to modify the SequenceModel file, and some mods are also required in the ModelSupport.seq file.  I don't want to modify the defaults, therefore, I make copies of the files and specify that my sequences use the modified versions.  So, the process I'm using so far goes like this:


. copy the file

C:\Program Files\National Instruments\TestStand 4.1.1\Components\Models\TestStandModels\ModelSupport.seq

to

C:\MyWorkingDirectory\ModelSupport_multiReport.seq

. download SequentialModel.seq from this thread
http://forums.ni.com/t5/NI-TestStand/Create-Two-TS3-5-Reports-XML-and-ATML/m-p/471394

. copy the file to
C:\MyWorkingDirectory\SequentialModel_multiReport.seq

. open the above sequence in the sequence editor
. under the following subsequences, there are sequence calls to the built-in sequence called ModelSupport.seq.  You need to redidrect these calls to use
C:\MyWorkingDirectory\SequentialModel_multiReport.seq

  . the sequence calls that need to be changed are found in
  Test UUTs
          
  Single Pass
  Configure Report Options (call to "Configure Report Options")
  Configure SecondReport Options (call to "Configure Report Options")

. create the directory
  C:\Program Files\National Instruments\TestStand 4.1.1\Cfg\SecondReportDetails
 
. note that the above directory "Cfg" is a shortcut to
C:\Documents and Settings\All Users\Application Data\National Instruments\TestStand 4.1.1\Cfg\

. in SequentialModel_multireport.seq, find references to
"C:\\Program Files\\National Instruments\\TestStand 3.5\\Cfg\\SecondReportDetails"

and change them to

"C:\\Documents and Settings\\All Users\\Application Data\\National Instruments\\TestStand 4.1.1\\Cfg\\SecondReportDetails"

  . There are several references
      . Test UUTs -> Get 2nd Report Options
      . Single Pass -> Get 2nd Report Options
      . Configure Second Report Options -> Edit Report Options

. after making the modifications, verify in your main sequence
    . Configure -> Second Report Options
  If the configure window comes up, everything is ok so far.

. Modify sequence file to require different model
    . Edit -> Sequence File Properties, Advanced tab
    . Model Option -> Require Specific Model
    . Browse to
    C:\MyWorkingDirectory\SequentialModel_multiReport.seq
    . ok
    
 Finally, the problems:

1.  Normally, when you run the sequence in "Test UUTs" mode, when you stop (from the UUT serial number prompt) the last test result comes up in a view pane in either Sequence Editor or the test executive, which ever you happen to be using.  This causes a file "TempReport.html" to be generated in the reports directory, and normally, this file is removed when you dismiss the report viewer.  This delete is no longer happening, and the directory is going start accumulating "TempReport_0002.html," "TempReport_0003.html," files.  This is undesirable.  I went looking through the model and related files, but could not find where the temporary file is created or deleted, nor could I find where the viewer within the sequence editor is invoked. 

2.  If the first report is html and the second is xml, the resulting xml file can no longer be viewed either in the Sequence Editor's or test executive's view pane or in Internet Explorer.  The message in IE is:

 

<quote>

The XML page cannot be displayed

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

Microsoft JScript runtime error 'null' is null or not an object line = 381, col = 3 (line is offset from the start of the sc...

</quote>

 

I checked, and there is nothing unique or unremarkable on line 381.  Actually, column 3 is whitespace, and the rest of the line contains tags used elsewhere and just some ordinary data.  If the order of the reports is switched, the xml report is viewable both in the sequence editor report view and via Internet Explorer.  (That is, make the first report the xml file, and the second the html file.)  Now, I know what you're thinking.  "Doc, it hurts when I do that."  "Well then don't do that!"  If it works one way and not the other, then use the way that works.  My concern, however, is why would the resulting xml files differ?  If I let this slide, is it going to come back as a big problem later, after the memory of how I set this up is no longer fresh?

3. If I pull up the Configure->Report Options pane in the Sequence Editor, finish up, then don't wait several seconds before pulling up Configure->Second Report Options, the Sequence Editor often just disappears from the desktop.  A few seconds later, I get that annoying "Do you want to tell Microsoft about the problem?" dialog that appears when a program crashes and dies.

    Has anyone encountered any of this, or how to fix any of it?  Thanks.

-M

0 Kudos
Message 1 of 8
(4,590 Views)

Hi

 

I just have a couple of questions about the problems you posted.

 

1.  What settings are you using in the report generation preferences?  Did the temp files get deleted correctly before you modified the sequence files?

 

2.  What happens if you switch the two around?  Meaning create the first one in XML and the second in HTML, or even both in XML.

 

3.  Where did the second report options menu come from?  Is that part of the custom files you were using?

 

Thanks. 

Shelby S
National Instruments
Applications Engineer
0 Kudos
Message 2 of 8
(4,559 Views)

    I think I addressed all your questions in my original post, but since it ran a bit long, I'll recap....

 

1.  I'll attach screenshots of my report options tab for the first report.  The second is the same, with the only change being that it's configured for xml reports.

 

   The temp files were deleted correctly prior to configuring for multiple reports.

 

2.  If the first report is xml and the second is html, both are readable.  If the second is xml, the xml report is not readable by a browser, whether the first is html or xml.  If the first is also xml, it is apparently over-written by the second xml, which is bad.

 

3.  I'm using a modified version of the instructions from this link to generate multiple reports.

http://forums.ni.com/t5/NI-TestStand/Create-Two-TS3-5-Reports-XML-and-ATML/td-p/471394

 

    I modified the instructions to work with TestStand 4.1.1.  I also modified it so I would not be changing the default sequence model. I'll attach the modified sequence model.

 

-Mark

 

0 Kudos
Message 3 of 8
(4,531 Views)

Hi,

 

Thanks for the clarifications.  I am currently attempting to reproduce what you are seeing, but it is asking for the file "ModelSupport_multiReport.seq".  Could you please attach this file as well?  Thank you.

Shelby S
National Instruments
Applications Engineer
0 Kudos
Message 4 of 8
(4,508 Views)
0 Kudos
Message 5 of 8
(4,506 Views)

Hi,

 

I have been able to reproduce what you are seeing.  It seems that the style sheet isn't being used correctly in the second report.  It will take me some time to dig through the sequences and see exactly what is going on, but I will do my best to find out why this may be happening.

Shelby S
National Instruments
Applications Engineer
0 Kudos
Message 6 of 8
(4,477 Views)
Solution
Accepted by topic author Neurotikart

Hi,

 

I have not been able to get the files you are using to work, but I did find a different sequence model on our DevZone page that is working for me, when trying to create two different reports.  It can be found here:

 

http://zone.ni.com/devzone/cda/epd/p/id/3278

 

As it says in the instructions, just change the local variable called "DisplayedReportFormat" in the tworeportssequentialv30.seq file to "html" or "xml" to change the output type of the second report.  The first report type is configured normally through the menu.  Also be sure to change the station options to use this model.  I have confirmed that this is working and that the temp file is also removed each time.  Hope this helps!

Shelby S
National Instruments
Applications Engineer
0 Kudos
Message 7 of 8
(4,470 Views)

Ok, I've got it.  Thanks.  I don't much care for the second report type being configured as a local in the sequence model, but I can work with that. And, if I want to disable the second report, I can just make it the same type as the first report.

 

I have also verified that this model works, and doesn't litter the reports directory with temporary report files.  Thanks again.

 

-Mark

 

0 Kudos
Message 8 of 8
(4,424 Views)