Reporting Modes in UFT

. 2 mins read

Reporting Modes in UFT

Reporter object in UFT has different reporting modes. This post discusses about various mode available in reporter object.

Reporting Modes

Available reporting modes in UFT are

Report ModeDescription
0 or rfEnableAllAll events are displayed in the Run Results. This is the Default report mode
1 or rfEnableErrorsAndWarningsOnly events with a warning or fail status are displayed in the Run Results.
2 or rfEnableErrorsOnlyOnly events with a fail status are displayed in the Run Results.
3 or rfDisableAllNo events are displayed in the Run Results.

Report Filter

You can use the Report.Filter method to determine which steps or types of steps are included in the Run Results. You can 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. You can also use the Report.Filter method to retrieve the current report mode.

CodeDescription
Reporter.Filter = rfDisableAllDisables reporting of subsequent steps.
Reporter.Filter = rfEnableAllEnables reporting of subsequent steps.
Reporter.Filter = rfEnableErrorsOnlyInstructs UFT to include only subsequent failed steps in the Run Results.
Reporter.Filter = rfEnableErrorsAndWarningsInstructs UFT to include only subsequent Failed or Warning steps in the Run Results
myReportMode = Reporter.FilterReturns current Report Mode.

Sample Code

Dim myReportMode
reporter.Filter = rfDisableAll
PrintReportMode("rfDisableAll")
reporter.Filter = rfEnableAll
PrintReportMode("rfEnableAll")
reporter.Filter = rfEnableErrorsOnly
PrintReportMode("rfEnableErrorsOnly")
reporter.Filter = rfEnableErrorsAndWarnings
PrintReportMode("rfEnableErrorsAndWarnings")

Sub PrintReportMode(ByVal reportModeName)
 myReportMode = reporter.Filter
 print myReportMode & " - " & reportModeName
End Sub

The output of the above sample code would be

3 - rfDisableAll
0 - rfEnableAll
2 - rfEnableErrorsOnly
1 - rfEnableErrorsAndWarnings

Software Testing
Drag and drop items from windows explorer to application UFT
08 Aug 2016

Subroutine to drag and drop item from windows explorer to application using UFT or QTP. By default this feature is not yet available in QTP or UFT.

Software Testing
Optional Steps in UFT
27 May 2015

Master the use of Optional Steps in UFT or QTP. Understand what are optional steps.

Software Testing
UFT Function to Select an item from a WebList or WinComboBox
24 Nov 2013

UFT/QTP Function to select an item form WebList or WinComboBox. It selects a list item specified in the function call, reports pass or fail.