Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | Related Pages

rcTestReport Class Reference

Test Report class for RunControl. More...

List of all members.

Public Member Functions

 __init__ ()
 initReport (title)
 addHTML (htmlString, section=None)
 addHeading (text)
 addSection (caption, insert=1)
 insertSection (sectionId, beforeSectionId=None)
 addSectionItem (sectionId, label, text, url='')
 addSectionImage (sectionId, caption, url, width='', height='')
 addSectionTable (sectionId, border='1', width='')
 addTableHeader (tableId, text, align='')
 beginTableRow (tableId)
 addTableData (text, url='', align='', width='')
 findTag (node, tagName)
 xmlToString ()
 transformToFile (xslFileName, htmlFileName)
 getReports ()
 getChildNodes (node)


Detailed Description

Test Report class for RunControl.

This class provides a mechanism to create test reports in a well formed (XML) format using the provided report building methods and lets the user transform it to HTML format by providing an XSLT stylesheet template. A third-party tool called Pyana is used to do the transformation. A sample template (reportStyle.xsl.sample) is provided in the RunControl directory. For more information on XSLT see the following links:

XSL Transformations W3C Recommendation

XSLT Tutorial

Definition at line 26 of file rcTestReport.py.


Member Function Documentation

addHeading text   ) 
 

Adds a heading to the report

Parameters:
text Heading text

addHTML htmlString  ,
section  = None
 

Adds an arbitrary HTML fragment to the end of the report or a section

Parameters:
htmlString HTML fragment.
section Optional section id that this HTML will be written to. If no section is specified then HTML is added to the end of the report.

addSection caption  ,
insert  = 1
 

Adds a section to the report and returns the section id.

Parameters:
caption Section caption
insert 0 = Do not insert the section into the report 1 = Insert the section into the report (default)
Returns:
Section id.

addSectionImage sectionId  ,
caption  ,
url  ,
width  = '',
height  = ''
 

Adds an image to a section. Images can have a caption, and an optional width and height. The url parameter specifies the location of the image.

Parameters:
sectionId Id of the section that this image will be inserted in.
caption Image caption
url Image source URL
width Optional width of the image
height Optional height of the image

addSectionItem sectionId  ,
label  ,
text  ,
url  = ''
 

Adds a section item. Section items are entries with a label and text and an optional URL.

Parameters:
sectionId Id of the section that this item will be inserted in.
label Item label
text Item text
url Item URL

addSectionTable sectionId  ,
border  = '1',
width  = ''
 

Adds a table to a section. Border and width are optional

Parameters:
sectionId Id of the section that this image will be inserted in.
border Specifies whether the table will have a border or not. Default value is 1.
width Specifies the width of the border in percentage relative to the width of the page.
Returns:
Table id.

addTableData text  ,
url  = '',
align  = '',
width  = ''
 

Adds a data column to the table row that was started by the last beginTableRow() call.

Parameters:
text Text of the data column.
url Optional. If the text refers to a hyperlink provide the URL here.
align Optional text alignment.
width Optional column width in percentage.

addTableHeader tableId  ,
text  ,
align  = ''
 

Adds one column header to the table.

Parameters:
tableId Id of the table where column headers are being added.
text Column header text.
align Optional text alignment.

beginTableRow tableId   ) 
 

Starts a table row.

Parameters:
tableId Id of the table where the row is being added.

initReport title   ) 
 

Initializes the report class and provides a title for the report

Parameters:
title The title that will show in the window title of the HTML browser

insertSection sectionId  ,
beforeSectionId  = None
 

Inserts a previously added section (with insert=0) to the specified position in the report.

Parameters:
sectionId Id of the section to be inserted
beforeSectionId Id of the section that will come after the section specified by sectionId. If it is None then it is appended to the end. Defaults to None.

transformToFile xslFileName  ,
htmlFileName 
 

Based on the input template and output filename parameters creates an HTML report.

Parameters:
xslFileName Input XSLT template file name.
htmlFileName Output HTML filename.


The documentation for this class was generated from the following file:
Generated on Fri Jul 21 13:27:53 2006 for LATTE R04-12-00 by doxygen 1.4.3