Studio:Reporter: Difference between revisions

From STRIDE Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 28: Line 28:
| width="150" valign="top" align="left" | Loads the results from a saved XML file. This method will '''''not''''' clear the current data in the reporter before loading the file. The file parameter is the full system path to the XML file to load.<br>
| width="150" valign="top" align="left" | Loads the results from a saved XML file. This method will '''''not''''' clear the current data in the reporter before loading the file. The file parameter is the full system path to the XML file to load.<br>
|-
|-
| width="150" | '''RemoveAll '''()<br>
| width="150" | '''RemoveAll '''()<br>  
| width="150" valign="top" align="left" | Method<br>  
| width="150" valign="top" align="left" | Method<br>  
| width="150" valign="top" align="left" | Removes all suites from the root level collection.&nbsp; This method is a shortcut to reporter.Suites.RemoveAll().<br>
| width="150" valign="top" align="left" | Removes all suites from the root level collection.&nbsp; This method is a shortcut to reporter.Suites.RemoveAll().<br>
|-
|-
| width="150" valign="top" | string '''MakeReport '''(<br>&nbsp;&nbsp;&nbsp; string file [optional],<br>&nbsp;&nbsp;&nbsp; bool linked [optional]<br>)<br>
| width="150" | string '''MakeReport '''(<br>&nbsp;&nbsp;&nbsp; string file [optional],<br>&nbsp;&nbsp;&nbsp; bool linked [optional]<br>)<br>  
| width="150" valign="top" | Method<br>  
| width="150" valign="top" | Method<br>  
| width="150" valign="top" | Builds an HTML report for all suites. A filename can be passed in so the HTML results can be written to that file -- otherwise, the default filename of SuiteReport.html is used. If a full path is not specified as part of the filename, the report is generated in the STRIDE installation directory. If the linked parameter is set to true, each suite will be shown as a link in the parent suite's report. This method is a shortcut to reporter.Suites.MakeReport().<br>
| width="150" valign="top" | Builds an HTML report for all suites. A filename can be passed in so the HTML results can be written to that file -- otherwise, the default filename of SuiteReport.html is used. If a full path is not specified as part of the filename, the report is generated in the STRIDE installation directory. If the linked parameter is set to true, each suite will be shown as a link in the parent suite's report. This method is a shortcut to reporter.Suites.MakeReport().<br>  
<br>
<br>  


|-
|-
| width="150" valign="top" | string '''Save '''(<br>&nbsp;&nbsp;&nbsp; string file<br>)
| width="150" | string '''Save '''(<br>&nbsp;&nbsp;&nbsp; string file<br>)  
| width="150" valign="top" | Method<br>  
| width="150" valign="top" | Method<br>  
| width="150" valign="top" | This method is a shortcut to reporter.Suites.Save().<br>
| width="150" valign="top" | This method is a shortcut to [[#suites-makereport|reporter.Suites.Save()]].<br>
|-
|-
| width="150" valign="top" | '''ReportTemplate'''<br>  
| width="150" | '''ReportTemplate'''<br>  
| width="150" valign="top" | Property,<br>string
| width="150" valign="top" | Property,<br>string  
| width="150" valign="top" | <br>
| width="150" valign="top" | Gets/sets the report template file to use when generating HTML reports.<br>
|-
|-
| width="150" valign="top" | Suites<br>  
| width="150" | [[#reporter.Suites|Suites]]<br>  
| width="150" valign="top" | Object<br>  
| width="150" valign="top" | Object<br>  
| width="150" valign="top" | Top level Suites collection.<br>
| width="150" valign="top" | Top level Suites collection.<br>
Line 55: Line 55:
{| width="100%" cellspacing="0" cellpadding="10" border="1"
{| width="100%" cellspacing="0" cellpadding="10" border="1"
|-
|-
| Member
| width="150" valign="top" bgcolor="#66ff99" align="left" | '''Member '''
| Type
| bgcolor="#66ff99" | '''Type '''
| Description
| bgcolor="#66ff99" | '''Description '''
|-
|-
|  
| width="150" valign="top" align="left" | suite '''Item '''(<br>&nbsp;&nbsp;&nbsp; index<br>)
|  
| valign="top" align="left" | Method
|  
| valign="top" align="left" | Returns the specified Suite object.&nbsp; The index can be integer or string.
|-
|-
|  
| width="150" valign="top" align="left" | '''Count'''
|  
| valign="top" align="left" | Property,<br>integer<br>Read-only
|  
| valign="top" align="left" |  
|-
|-
|  
| width="150" valign="top" align="left" | suite '''Add '''(<br>&nbsp;&nbsp;&nbsp; string name<br>)
|  
| valign="top" align="left" | Method
|  
| valign="top" align="left" |  
|-
|-
|  
| width="150" valign="top" align="left" | suite '''Remove '''(<br>&nbsp;&nbsp;&nbsp; index<br>)
|  
| valign="top" align="left" | Method
|  
| valign="top" align="left" |  
|-
|-
|  
| width="150" valign="top" align="left" | '''RemoveAll'''()
|  
| valign="top" align="left" | Method
|  
| valign="top" align="left" |  
|-
|-
|  
| width="150" valign="top" align="left" | string '''MakeReport '''(<br>&nbsp;&nbsp;&nbsp; string file [optional],<br>&nbsp;&nbsp;&nbsp; bool linked [optional]<br>)
|  
| valign="top" align="left" | Method
|  
| valign="top" align="left" | [[|]]
|-
|-
|  
| width="150" valign="top" align="left" | suite '''Find '''(<br>&nbsp;&nbsp;&nbsp; string name,<br>&nbsp;&nbsp;&nbsp; bool depth [optional]<br>)
|  
| valign="top" align="left" | Method
|  
| valign="top" align="left" |  
|-
|-
|  
| width="150" valign="top" align="left" | string '''Save '''(<br>&nbsp;&nbsp;&nbsp; string file<br>)
|  
| valign="top" align="left" | Method
|  
| valign="top" align="left" |  
|-
|-
|  
| width="150" valign="top" align="left" | '''Load '''(<br>&nbsp;&nbsp;&nbsp; string file<br>)
|  
| valign="top" align="left" | Method
|  
| valign="top" align="left" |  
|}
|}



Revision as of 18:27, 30 June 2008

Introduction

The STRIDE Reporter allows you to track and report test cases for scripts, store test data in XML format, and produce HTML output for viewing of test case results.

The STRIDE Reporter tracks two primary objects: Suites and Test Cases, which are further described as follows:

  • A Suite is a collection of Test Cases and other Suites. A Suite has a name, a description, and zero (0) or more children, which can be either Test Cases or other sub Suites.
  • A Test Case represents a single pass/fail item and it consists of a name, a description, any test data that is added during the lifetime of the TestCase, and a status. The status can be any one of the following:
    • PASS
    • FAIL
    • IN PROGRESS
    • NOT APPLICABLE (or N/A)

Automation API


reporter

Member
Type
Description

Load (
    string file
)

Method
Loads the results from a saved XML file. This method will not clear the current data in the reporter before loading the file. The file parameter is the full system path to the XML file to load.
RemoveAll ()
Method
Removes all suites from the root level collection.  This method is a shortcut to reporter.Suites.RemoveAll().
string MakeReport (
    string file [optional],
    bool linked [optional]
)
Method
Builds an HTML report for all suites. A filename can be passed in so the HTML results can be written to that file -- otherwise, the default filename of SuiteReport.html is used. If a full path is not specified as part of the filename, the report is generated in the STRIDE installation directory. If the linked parameter is set to true, each suite will be shown as a link in the parent suite's report. This method is a shortcut to reporter.Suites.MakeReport().


string Save (
    string file
)
Method
This method is a shortcut to reporter.Suites.Save().
ReportTemplate
Property,
string
Gets/sets the report template file to use when generating HTML reports.
Suites
Object
Top level Suites collection.


reporter.Suites

Member Type Description
suite Item (
    index
)
Method Returns the specified Suite object.  The index can be integer or string.
Count Property,
integer
Read-only
suite Add (
    string name
)
Method
suite Remove (
    index
)
Method
RemoveAll() Method
string MakeReport (
    string file [optional],
    bool linked [optional]
)
Method [[|]]
suite Find (
    string name,
    bool depth [optional]
)
Method
string Save (
    string file
)
Method
Load (
    string file
)
Method


reporter.Suites.Item


reporter.Suites.Item.CustomData


reporter.Suites.Item.CustomData.Item


reporter.Suites.Item.Annotations


reporter.Suites.Item.Annotations.Item


reporter.Suites.Item.Tests


reporter.Suites.Item.Tests.Item


reporter.Suites.Item.Tests.Item.Comments


reporter.Suites.Item.Tests.Item.Comments.Item