Reporter Object is used to report test case status in QTP.
Reporter object is used for sending information to the test results.
Reporter Methods
ReportEvent
Reporter Properties
Filter
ReportPath
RunStatus
Syntax -
Reporter.ReportEvent EventStatus, ReportStepName, Details [, ImageFilePath]
EventStatus Number or pre-defined constant Status of the Test Results step:
0 or micPass:
1 or micFail:
2 or micDone:
3 or micWarning:
Properties of Reporter object in QTP
Reporter.Filter
CurrentMode = Reporter.Filter and Reporter.Filter = NewMode
0 or rfEnableAll Default. All reported events are displayed in the Test Results.
1 or rfEnableErrorsAndWarnings Only event with a warning or fail status are displayed in the Test Results.
2 or rfEnableErrorsOnly Only events with a fail status are displayed in the Test Results.
3 or rfDisableAll No events are displayed in the Test Results.
Reporter. ReportPath
The following example uses the ReportPath property to retrieve the folder in which the results are stored and displays the folder in a message box.
dim Path
Path = Reporter.ReportPath ‘ path where results are stored
Reporter. RunStatus
The following example uses the RunStatus property to retrieve the status of the run session at a specific point and exit the action if the test status is fail. If the test status is not fail, the test run continues.
Reporter.RunStatus = micFail Then ExitAction
No comments:
Post a Comment
Please Leave your reply. We value your feedback and inputs