Studio:Reporter: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 23: | Line 23: | ||
|- | |- | ||
| width="150" valign="top" align="left" | '''Load '''(<br> string file<br>) | | width="150" valign="top" align="left" | '''Load '''(<br> string file<br>) | ||
| | | valign="top" align="left" | Method<br> | ||
| | | valign="top" align="left" | This method is a shortcut to [[#suites-load|reporter.Suites.Load()]].<br> | ||
|- | |- | ||
| width="150" valign="top" align="left" | '''RemoveAll '''()<br> | | width="150" valign="top" align="left" | '''RemoveAll '''()<br> | ||
| | | valign="top" align="left" | Method<br> | ||
| | | valign="top" align="left" | This method is a shortcut to [[#suites-removeall|reporter.Suites.RemoveAll()]].<br> | ||
|- | |- | ||
| width="150" valign="top" align="left" | string '''MakeReport '''(<br> string file [optional],<br> bool linked [optional]<br>)<br> | | width="150" valign="top" align="left" | string '''MakeReport '''(<br> string file [optional],<br> bool linked [optional]<br>)<br> | ||
| | | valign="top" | Method<br> | ||
| | | valign="top" | This method is a shortcut to [[#suites-makereport|reporter.Suites.MakeReport()]].<br> | ||
<br> | <br> | ||
|- | |- | ||
| width="150" valign="top" align="left" | string '''Save '''(<br> string file<br>) | | width="150" valign="top" align="left" | string '''Save '''(<br> string file<br>) | ||
| | | valign="top" | Method<br> | ||
| | | valign="top" | This method is a shortcut to [[#suites-save|reporter.Suites.Save()]].<br> | ||
|- | |- | ||
| width="150" valign="top" align="left" | '''ReportTemplate'''<br> | | width="150" valign="top" align="left" | '''ReportTemplate'''<br> | ||
| | | valign="top" | Property,<br>string | ||
| | | valign="top" | Gets/sets the report template file to use when generating HTML reports.<br> | ||
|- | |- | ||
| width="150" valign="top" align="left" | [[#reporter.Suites|Suites]]<br> | | width="150" valign="top" align="left" | [[#reporter.Suites|Suites]]<br> | ||
| | | valign="top" | Object<br> | ||
| | | valign="top" | Top level Suites collection.<br> | ||
|} | |} | ||
Line 95: | Line 95: | ||
== <br>reporter.Suites.Item<br> == | == <br>reporter.Suites.Item<br> == | ||
{| width="100%" cellspacing="0" cellpadding="10" border="1" | |||
|- | |||
| width="150" valign="top" bgcolor="#66ff99" align="left" | '''Member ''' | |||
| bgcolor="#66ff99" | '''Type ''' | |||
| bgcolor="#66ff99" | '''Description ''' | |||
|- | |||
| width="150" valign="top" align="left" | | |||
| valign="top" align="left" | | |||
| valign="top" align="left" | | |||
|- | |||
| width="150" valign="top" align="left" | | |||
| valign="top" align="left" | | |||
| valign="top" align="left" | | |||
|- | |||
| width="150" valign="top" align="left" | | |||
| valign="top" align="left" | | |||
| valign="top" align="left" | | |||
|- | |||
| width="150" valign="top" align="left" | | |||
| valign="top" align="left" | | |||
| valign="top" align="left" | | |||
|- | |||
| width="150" valign="top" align="left" | | |||
| valign="top" align="left" | | |||
| valign="top" align="left" | | |||
|- | |||
| width="150" valign="top" align="left" | | |||
| valign="top" align="left" | | |||
| valign="top" align="left" | | |||
|- | |||
| width="150" valign="top" align="left" | | |||
| valign="top" align="left" | | |||
| valign="top" align="left" | | |||
|- | |||
| width="150" valign="top" align="left" | | |||
| valign="top" align="left" | | |||
| valign="top" align="left" | | |||
|- | |||
| width="150" valign="top" align="left" | | |||
| valign="top" align="left" | | |||
| valign="top" align="left" | | |||
|- | |||
| width="150" valign="top" align="left" | | |||
| valign="top" align="left" | | |||
| valign="top" align="left" | | |||
|- | |||
| width="150" valign="top" align="left" | | |||
| valign="top" align="left" | | |||
| valign="top" align="left" | | |||
|- | |||
| width="150" valign="top" align="left" | | |||
| valign="top" align="left" | | |||
| valign="top" align="left" | | |||
|} | |||
== <br>reporter.Suites.Item.CustomData<br> == | == <br>reporter.Suites.Item.CustomData<br> == |
Revision as of 20:22, 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 |
This method is a shortcut to reporter.Suites.Load(). |
RemoveAll () |
Method |
This method is a shortcut to reporter.Suites.RemoveAll(). |
string MakeReport ( string file [optional], bool linked [optional] ) |
Method |
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. Any name that contains path separation characters (forward or back slashes) will be treated as a suite path and trigger the creation all child suites represented by the path string. |
suite Remove ( index ) |
Method | Removes a Suite from the collection and returns reference to the removed obejct. The index can integer or string. If the specified string index is not found, nothing is removed and null is returned. If a provided integer index is out of range, an exception is thrown. |
RemoveAll() | Method | Empties the collection. |
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 (default is false), each suite will be shown as a link in the parent suite's report. |
suite Find ( string name, bool depth [optional] ) |
Method | Searches for a suite with the specified name and returns the object if found, null otherwise. If depth is set to true (the default), all sub-suites will also be searched in depth first order. If a name contains path separation characters (forward or back slash), this method attempts to find the corresponding child suites represented by the path. |
string Save ( string file [optional] ) |
Method | Saves the collection's data (including all children) as XML. The persisted file is able to be read using the Load() method or can be upload to the STRIDE Portal. The file parameter, if provided, is the full system path to the file to create -- otherwise defaults to SuiteData.xml located in the STRIDE installation directory. |
Load ( string file ) |
Method | Loads the results from a saved XML file. This method will not clear the current data in the collection before loading the file. The file parameter is the full system path to the XML file to load. |
reporter.Suites.Item
Member | Type | Description |
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