Here iam providing an overview of Reporter Object in QTP.
Reporter Object is used for sending information to the test results. With the help of this object you can:
· Report the status of test results (like pass, fail, warning)
· Enable/Disable reporting of step(s) following the statement.
· Retrieve the folder path in which the current test's results are stored.
· Retrieve the run status at the current point of the run session.
There are some very important methods and properties associated with it.
This is a very common method used with Reporter object.
Reporter.ReportEvent EventStatus, ReportStepName, Details
Where EventStatus can be:
3 or micWarning: Again, used to send warning message to the test report and does not affect status of test.
ReportStepName -->name of step
Details --> are the user defined details for the given step.
Reporter.ReportEvent micPass, "Creation Scenario Validation", " Successfully passed"
"Filter" property :
There can be situations where you don't want the full status displayed on the test report. This property can be used to selectively filter the status of your tests.
Reporter.Filter = NewMode
3 or rfDisableAll: All events in the Test Results are disabled.
'ReportPath" Property :
This is used to get the path in which current test results are stored.
This is used to get the current status of the run session
if Reporter.RunStatus = 0 then
Have a nice day.......