NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Reports with HTML links to "sub-reports"

I have a main sequence that runs several sequences of tests.  I would like to have these tests create separate reports and then link them from my main sequence's report.  I have selected HTML reporting style.  I have figured out how to link by looking at Teststand\Examples\ModifyingReports\HTMLDiagnosticLinks.  The only thing left is figuring out how to create the "sub-reports" instead of including the information in the main report.

Any suggestions?

Thanks,
Bob Young
0 Kudos
Message 1 of 11
(4,538 Views)
Bob,
 
What is the expected format of these sub-report.
eg
Sub-Report Header
Results
Sub-Report Footer
 
Regards
Ray Farmer
 
 

Message Edited by Ray Farmer on 12-21-2005 08:52 AM

Regards
Ray Farmer
0 Kudos
Message 2 of 11
(4,532 Views)
Ray,
 
I would like to have the sub-reports be the same format as the main report but it is not important if it has a header like the main report has.  I think that it needs to just make a report that will print on 50 pages into something easily readable.  I have already toyed with the idea of a database, but I would still have to create a report of some sort, so if I can modify TestStand's report sequence to do it, that would be even better.
 
So basically I am dynamically calling a series of selectable tests.  If each of the called tests had their own report liked in to the main test where it was called, that would be great. 
 
So, I'm looking for something like this:
Main Report: 

UUT Report

  • Station ID:
  • BOBY-L
  • Serial Number:
  • NONE
  • Date:
  • Monday, December 12, 2005
  • Time:
  • 4:16:19 PM
  • Operator:
  • administrator
  • Number of Results:
  • 37
  • UUT Result:
  • Failed
  • Failure Chain:

  • Step Sequence Sequence File
    Numeric Limit Test: Receive 7 bytes MainSequence Read Test.seq
    SequenceCall MainSequence testing.seq


    Begin Sequence: MainSequence
    (C:\VSS\Test Driver Code\Tests\Initializing Driver Test\Initializing Driver Test.seq)
    SequenceCall
    Status: Passed


    **********************LINK TO TEST****************
    End Sequence: MainSequence
     
    *****************SUB-REPORT LINKED IN*****************

    Begin Sequence: MainSequence
    (C:\VSS\Test Driver Code\Tests\__TestStand - Common Components\common sequences\Read.seq)
    Read 20 bytes
    Status: Passed
    Read the following bytes from Address 0000 of the FLASH:
    46 00 C5 07 00 00 70 00 C3 03 00 00 9A 00 8D 04 00 00 E8 00

    End Sequence: MainSequence

    0 Kudos
    Message 3 of 11
    (4,516 Views)
    Bob -

    What are your major factors in selecting the HTML report style?  For a "sub-reports" type of reporting style, I usually use the expand stylesheet with XML reporting.  Is this not a feasible option in your case?

    You bring up an interesting report customization case for the HTML report style. While certainly possible, it would require customization of the reportgen_html.seq file that is not trivial.  My initial thoughts would be to modify the AddReportBody sequence within the "reportgen_html.seq" file.  Here are some general steps that may help get you started:
    - In AddReportBody, you could run a for loop for each element in the resultlist (the resultlist from your MainSequence can be found in Parameters.Results.TS.SequenceCall.ResultList)
    - Check for any object in the resultlist array that contains a "SequenceCall" step type (information can be found in Parameters.Result.TS.SequenceCall.ResultList[num].TS.StepType)
    - Make a recursive call to the AddReportBody step with just the Subsequence context (Parameters.Result.TS.SequenceCall.ResultList[num].TS.SequenceCall)
    - Create a new report object, and use the report methods to clear, set format, and write to file.
    - Remove all elements in the subsequence result list, and create a single container with a string value.  Inside that string value, specify the subsequence report path as an HTML link ("<a href>subsequence report</a>")

    As this is an interesting case, I am currently creating some code within the AddReportBody to implement the above steps.  If I come up with an example,  I will let you know.

    If I don't get in touch with you beforehand, have a great holiday weekend!

    Regards,
    Andrew W || Applications Engineer
    National Instruments
    Message 4 of 11
    (4,506 Views)
    Sorry that I am so late in replying, but I was out due to the holidays and my wife has a thing about work during the vacation Smiley Happy.

    I selected HTML over XML basically due to familiarity.  I don't ahve any real experience with XML (other than getting podcastsSmiley Wink).  So, you suggested the "expand stylesheet with XML reporting."  What is this?  Will it do what I am asking for?  If so, great!  So far, I don't think I am locked into HTML over any other type of report just so long as it is readable by my customer and it makes sense logically. 

    As far as making sense logically, it seems that what I was asking for would be fairly common in HTML reports.  I am suprized that I was among the first to want something less linear or with variations of granularity.  Maybe others wanted it as well but did not express that well to NI.

    Thanks for your help.  I will look into expanded stylesheet with XML reporting and maybe trying your HTML modifications as well.

    Bob Young
    0 Kudos
    Message 5 of 11
    (4,465 Views)
    It turns out that the XML report was the way to go.  I like the way it can be collapsed or expanded on a node by node basis.  Right now, it is the way I will be going unless I run into problems with my customer.

    Thanks,
    Bob Young

    0 Kudos
    Message 6 of 11
    (4,450 Views)
    Bob -
     
    Sounds great!  The expand stylesheet is always my personal preference in most reporting situations.
     
    Let me know if you need any other assistance.  Have a great day!
     
    Andrew W || Applications Engineer
    National Instruments
    Message 7 of 11
    (4,433 Views)
    I have a very similar requirement.  We will be running test for more than a day continously. I do not think i can afford to create one large report (XML or HTML) since it has out of memory problem. I would like to break up the report into seperate report for each sequence call and link to the main report by hperlinks. I know i can call the sequence in a seperate execution, which will give me a seperate report for each sequence, but it adds a overhead for all my sequence calls. I would really like to modify the "reportgen_html.seq" as suggested in this post. If anyone has already done this, please do share. Thanks
    0 Kudos
    Message 8 of 11
    (3,807 Views)

    Hi all,

      I do have a similar type of requirement where I need to create a new report for a particular sub sequence only.

      I use xml report generation and teststand 4.2. I took some of the ideas suggested by Andrew.

     

      So what I did was, I used a callback "testreport" and in that I ran a loop to check in the result list if it " contains any sequence call and sequence name matches with the name I am looking into" , if it matches I copied the result list of that sequence call into a local variable.

      Till here it works good. Now I need to make a new report for this result list. This is where I am struck in generating a new xml file.

     

    I used "testreport" callback because it runs at the end of the sequence where I can have the whole result list and make sub report for every sub sequence call to that particular sequence is made.

     

      I went through the reportgen_xml.seq, it was difficult for me to understand, is there some tips or areas which I can concentrate on instead of whole *xml.seq which I can copy and generate a new report for subsequence.

      I have another idea of moving this all result list data to labview and create a xml over there instead of in teststand.

     

    Can any one please guide me.

     

    Thanks,

    Surya.

    0 Kudos
    Message 9 of 11
    (3,771 Views)

    I got a solution for my query through NI:

     

    "I do 2 Sequence Call steps in my MainSequence and on each call I configured the Execution Options to "Use New Execution". I then selected the Sequence Call Advanced Settings button just to the right of this field and changed the Wait for Execution to Complete field to "Before Executing Next Step".

    This essentially forces the steps to stay sequential even though they are running in their own executions. "

     

    Thanks to NI support.

    Message 10 of 11
    (3,703 Views)