Studio:Reporter: Difference between revisions

From STRIDE Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 61: Line 61:
| width="150" valign="top" align="left" | suite '''Item '''(<br>&nbsp;&nbsp;&nbsp; index<br>)  
| width="150" valign="top" align="left" | suite '''Item '''(<br>&nbsp;&nbsp;&nbsp; index<br>)  
| valign="top" align="left" | Method  
| valign="top" align="left" | Method  
| valign="top" align="left" | Returns the specified Suite object.&nbsp; The index can be integer or string.
| valign="top" align="left" | Returns the specified Suite object.&nbsp; The index can be integer or string. When using a string index, If the specified item is not found, this method returns null.&nbsp; When using an integer index, an exception will be thrown if the requested index is out of range.<br>
|-
|-
| width="150" valign="top" align="left" | '''Count'''  
| width="150" valign="top" align="left" | '''Count'''  
| valign="top" align="left" | Property,<br>integer<br>Read-only  
| valign="top" align="left" | Property,<br>integer<br>'''Read-only'''
| valign="top" align="left" | <br>
| valign="top" align="left" | Read only property that returns the number of suites in the collection.<br>
|-
|-
| width="150" valign="top" align="left" | suite '''Add '''(<br>&nbsp;&nbsp;&nbsp; string name<br>)  
| width="150" valign="top" align="left" | suite '''Add '''(<br>&nbsp;&nbsp;&nbsp; string name [optional]<br>)  
| valign="top" align="left" | Method  
| valign="top" align="left" | Method  
| valign="top" align="left" | <br>
| valign="top" align="left" | Creates a new Suite in the collection.&nbsp; A name may be provided, but will default to TestSuite_# where # is chosen as 1 greater than the current Count of the collection. Returns the created object or throws an exception.<br>
|-
|-
| width="150" valign="top" align="left" | suite '''Remove '''(<br>&nbsp;&nbsp;&nbsp; index<br>)  
| width="150" valign="top" align="left" | suite '''Remove '''(<br>&nbsp;&nbsp;&nbsp; index<br>)  

Revision as of 18:41, 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. When using a string index, If the specified item is not found, this method returns null.  When using an integer index, an exception will be thrown if the requested index is out of range.
Count Property,
integer
Read-only
Read only property that returns the number of suites in the collection.
suite Add (
    string name [optional]
)
Method Creates a new Suite in the collection.  A name may be provided, but will default to TestSuite_# where # is chosen as 1 greater than the current Count of the collection. Returns the created object or throws an exception.
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