Example of an Event Report Writing in QTP, What is Reporter.ReportEvent



Example of an Event Report Writing in QTP, What is Reporter.ReportEvent



What  is Reporter.ReportEvent ?
Reporter.Reportvent is standard performing given by QTP to provide message customization to testing result window.

Syntax Will be:
Reporter.ReportEvent EventStatus, ReportStepName, Details [, ImageFilePathX]
where
EventStatus =  0 or micPass
1 or micFail 
2 or micDone
3 or micWarning
                        
-  Now Definition for the followings:

0 or micPass: Reason of this step is only Pass and send the specific message for report.
1 or micFail : Reason of this step is only Fail and send the specific message for report.
2 or micDone : It only send the message to the report without sending the status about pass / fail status of any testing.
3 or micWarning : A Warning message will be sent out to report. But it doesn't stop the test running. It also doesn't effect the fail / pass status of any testing.
 Results can be guess for any state like Fail, Pass, Warning etc. We can send screen-shot also to the confirm or test the results window.


Example of ReportEvent Function

The following examples use the ReportEvent function to report for failed step.

Reporter.ReportEvent 1, "Custom Step1", "The user defined steps failed."

OR

Reporter.ReportEvent micFail, "Custom Step1", "The user defined step failed."

We can ignore last two arguments (Details and ReportStepName) blank as well but recommended.

Reporter.ReportEvent 1, "", ""

OR

Reporter.ReportEvent micFail, "", ""







Advantages and Disadvantages of Automation Testing













Virtual Objects with Example in QTP
Cross Platform Testing


What is Object Spy in QTP Ordinal Identifiers Alone can Make an Object Unique



Test Automation Frameworks Types



No comments:

Post a Comment

Popular Posts