Reporter Object

Description

The object used for sending information to the run results.

Methods and Properties

Method AddRunInformationReports an event to the run results (HTML Report only)
Method CurrentActionIterationStatusRetrieves the run status of the current iteration of an action during the test run.
Method CurrentTestIterationStatusRetrieves the run status of the current iteration of a test during the test run.
Method FilterRetrieves or sets the current mode for displaying events in the run results.
Method ReportEventReports an event to the run results
ReportHtmlEventReports an event to the run results, with step name and details in HTML format if applicable.
ReportNoteAdds a note to the run results.
ReportPathRetrieves the folder path in which the current test's results are stored.
RunStatusRetrieves the run status at the current point of the run session.

Back to top

AddRunInformation Method

Description

Reports an event to the run results (HTML Report only)

Syntax

Reporter.AddRunInformation Custom Key,Description

Argument

Type

Description

Custom Key

String

The field to add to the run results. This field is added to the run results summary information in Additional Run Information (displayed at the top of the HTML report).

DescriptionString The text to report to the run results.

Back to top

CurrentActionIterationStatus Property

Description

Retrieves the run status of the current iteration of an action during the test run.

Syntax

Reporter.CurrentActionIterationStatus

Back to top

CurrentTestIterationStatus Property

Description

Retrieves the run status of the current iteration of a test during the test run.

Syntax

Reporter.CurrentTestIterationStatus

Back to top

Filter Property

Description

Retrieves or sets the current mode for displaying events in the run results. You can use this property to completely disable or enable reporting of steps following the statement, or you can indicate that you only want subsequent failed or failed and warning steps to be included in the report.

Syntax

To retrieve the mode setting:

CurrentMode = Reporter.Filter

To set the mode:

Reporter.Filter = NewMode

The mode can be one of the following values:

Mode

Description

0 or
rfEnableAll

Default. All reported events are displayed in the Run Results.

1 or rfEnableErrorsAndWarnings

Only event with a warning or fail status are displayed in the Run Results.

2 or
rfEnableErrorsOnly

Only events with a fail status are displayed in the Run Results.

3 or
rfDisableAll

No events are displayed in the Run Results.

Back to top

ReportEvent Method

Description

Reports an event to the run results

Syntax

Reporter.ReportEventEventStatus, ReportStepName, Details, [ImageFilePath]

Argument

Type

Description

EventStatus

Number or pre-defined constant

Status of the run results step:

0 or micPass: Causes the status of this step to be passed and sends the specified message to the run results.

1 or micFail: Causes the status of this step to be failed and sends the specified message to the run results. When this step runs, the test or component fails.

2 or micDone: Sends a message to the Run Results window without affecting the pass/fail status of the test or component.

3 or micWarning: Sends a warning message to the run results window, but does not cause the test or component to stop running, and does not affect the pass/fail status of the test or component.

ReportStepName

String

Name of the step displayed in the Run Results window.

Details

String

Description of the run results event. The string will be displayed in the step details frame in the run results.

ImageFilePath

String

Optional. Path and filename of the image to be displayed in the run results. Images in the following formats can be displayed: BMP, PNG, JPEG, and GIF.

Notes:

  • Images cannot be loaded from ALM.

  • Including large images in the run results may impact performance.

  • If an image is specified as a relative path, OpenText Functional Testing will first search the Results folder for the image and then the search paths specified in the Folders pane of the Options dialog box (Tools > Options > GUI Testing tab > Folders node).

Back to top

ReportHtmlEvent Method

Description

Reports an event to the run results, with step name and details in HTML format if applicable.

Syntax

Reporter.ReportHtmlEventEvent Status, ReportStepName, Details, [Image File Path]

Arguments

Argument

Type

Description

Event Status

String

The textual content of the note.

Possible values include:

  • 0 or micPass. Causes the status of this step to be passed and sends the specified message to the run results.
  • 1 or micFail. Causes the status of this step to be failed and sends the specified message to the run results. When this step runs, the test or component fails.
  • 2 or micDone. Sends a message to the run results without affecting the pass/fail status of the test or component.
  • 3 or micWarning. Sends a warning message to the run results window, but does not cause the test or component to stop running, and does not affect the pass/fail status of the test or component.
ReportStepNameStringName of the step displayed in HTML format.
DetailsStringDescription of the run results event. The string will be displayed in HTML format.
Image File PathVariant

Optional. Path and filename of the image to be displayed in the run results. Images in the following formats can be displayed:

  • BMP
  • PNG
  • JPEG
  • GIF

Note:  

Images cannot be loaded from ALM.

Including large images in the run results may impact performance.

If an image is specified as a relative path, OpenText Functional Testing will first search the Results folder for the image and then the search paths specified in the Folders pane of the Options dialog box (Tools > Options > GUI Testing tab > Folders node).

IMPORTANT

  • This method is similar to the existing ReportEvent method. However, this method is able to report the step name and details in HTML format.
  • It is important to ensure that the html string sent to the run results has correct syntax and will not affect the ability of the HTML report to display properly. Therefore, It is not recommended to use <html>, <head>,<body>, <script> tags in both step name and details.

Back to top

ReportNote Method

Description

Adds a note to the run results. The note is displayed in the Executive Summary Notes section of the Result Details pane when the root node is selected in the run results tree.

Syntax

Reporter.ReportNote NoteContent

Arguments

Argument

Type

Description

NoteContent

String

The textual content of the note.

Back to top

ReportPath Property

Description

Retrieves the folder path in which the current test's results are stored.

Note: Do not use this property to attempt to set the results folder path.

Syntax

Path = Reporter.ReportPath

Argument

Type

Description

Path

String

The folder path in which the current test's results are stored.

Back to top

RunStatus Property

Description

Retrieves the run status at the current point of the run session. For tests, it returns the status of current test during the test run. For business components, it returns the status of current business component (not the entire business process test).

Syntax

Reporter.RunStatus

Back to top

See also: