0% found this document useful (0 votes)
47 views2 pages

RP Event

The document discusses how to define custom test results in QTP using the Reporter object. The Reporter object allows defining custom event statuses like pass, fail, done, or warning and sending messages to the test report. Examples are given to report different event statuses by calling the ReportEvent method and passing parameters like event status, step name, and details.

Uploaded by

giri_772
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views2 pages

RP Event

The document discusses how to define custom test results in QTP using the Reporter object. The Reporter object allows defining custom event statuses like pass, fail, done, or warning and sending messages to the test report. Examples are given to report different event statuses by calling the ReportEvent method and passing parameters like event status, step name, and details.

Uploaded by

giri_772
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

QTPWorld http://www.qtpworld.com/index.php?

cid=92

Login | Search QTPWorld.com

Chapters Reporting Defect


Upcoming Trainings
Defining our own Result in result summary:
QTP Interview Questions
QTP has 4 types of result status:
VB Script - Part I
Pass
VB Script - Part II Fail
Done
VB Script - Part III
Warning
Working with Files using FSO

Excel Result is captured using ReportEvent Method:

Actions Generally QTP provides, test results, if we use qtp tool features like checkpoints. Suppose if we use flow control statements
(conditional and Loop statements), then we have to define our own result.For defining our own results, QTP is providing an
Functions utility object called "Reporter" by using reporter, we can define our own results.
Difference between Action and
Function Syntax:

Parameterization Reporter.ReportEvent EventStatus, ReportStepName, Details [, Reporter]

Object Repository Arguments:


Descriptive Programming
EventStatus: Status of the report step.Different types of event status are mentioned below:
Regular Expression
0 or micPass: Causes the status of this step to be passed and sends the specified message to the report.
Error Handling & Recovery
Scenario 1 or micFail: Causes the status of this step to be failed and sends the specified message to the report. When this step
runs, the test fails.
Output Values
2 or micDone: Sends a message to the report without affecting the pass/fail status of the test.
Database Connections

Automation Object Model 3 or micWarning: Sends a warning message to the report, but does not cause the test to stop running, and does not affect
the pass/fail status of the test.
Synchronization
ReportStepName: (String)Name of the intended step in the report (object name).
Environment Variables
Details: (String)Description of the report event. The string will be displayed in the step details frame in the report.
XML

Outlook
Ex 1: The following example use the ReportEvent method to report a Passed step with different format of Event status
Reporting Defect Reporter.ReportEvent 0, "User Login", "Passed as the Login functionality worked as per the requirment"

'OR

Contact Us Reporter.ReportEvent micPass, "User Login", "Passed as the Login functionality worked as per the requirment"

Ex 2: The following example use the ReportEvent method to report a Failed step with different format of Event status
info@qtpworld.com
Reporter.ReportEvent 1, "User Login", "Failed as the Login functionality didn't work as per the requirment"
+91- 9886477710
'OR

Reporter.ReportEvent micFail, "User Login", "Failed as the Login functionality didn't work as per the requirme

Ex 3: The following example use the ReportEvent method to report a Done step with different format of Event status

Reporter.ReportEvent 2, "User Login", "The Login functionality is validated"

'OR

Reporter.ReportEvent micDone, "User Login", "The Login functionality is validated"

Ex 4: The following example use the ReportEvent method to report a Warning step with different format of Event status

Reporter.ReportEvent 3, "User Login", "Warning : No input provided"

'OR

Reporter.ReportEvent micWarning, "User Login", "Warning : No input provided"

1 of 2 1/29/2016 9:42 AM
QTPWorld http://www.qtpworld.com/index.php?cid=92

Copyright QTPWorld.com 2013 Home | Demo videos | Students | Training | FAQ's | Feedback | About Us Designed By WebZone

2 of 2 1/29/2016 9:42 AM

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy