Subscribe by Email


Saturday, September 29, 2012

What is Reporter.ReportEvent? What is GetRoProperty? (In QTP)


In this article we are going to discuss regarding the two main things namely:
  1. Reporter. Report event and
  2. GetRoproperty
As far as the purpose of the reporter object is concerned it is used for sending or reporting the information to the results of the test. With a reporter object the following tasks can be performed:
  1. For reporting of the status of the results of the tests like success, failure, warning, error and so on.
  2. For enabling or disabling reporting of the steps that immediately follow the executed statement.
  3. For retrieving the folder path where the results of the current tests can be stored.
  4. For retrieving the execution status at the current point of the execution process.
There are many methods and properties that are associated with the reporter object and the reporter. Report event is one of them. 
Those methods and properties are as mentioned below:
  1. Reporter event method
  2. Filter property
  3. Run status property
Here the thing to be discussed is about the first one i.e., the reporter event method in detail. 
- This is the most commonly method that is used with the help of a reporter object. 
- It is certain that even if one has worked on quick test professional for a very short period of time then he/ she might have come across the use of this object. 
The syntax for using this object is as mentioned below:
Reporter. Reportevent event status, report step name, details [, image file path]

The event status can be one of the following:
  1. Mic Pass or 0: If the test step passes the run.
  2. Mic Fail or 1: If the test step fails the run.
  3. Mic done or 2: If the status of the test is not affected by the run of the test step.
  4. Mic warning or 3: If the status of the test is not affected by the run of the test step and a warning has to be issued.
- Next step i.e., the report step name represents the name of the step that is currently being executed. 
- The last aspect i.e., the details represent the details of the step as defined by the user. 
- The reporter. Report event can be used for reporting of the custom steps in the test results of the quick test professional.

- After the tests have been executed, the results can be stored in a text file or in an xls file via VBScript library functions. 
- It can be considered to be a kind of reporting mechanism of the quick test professional. 
- As the name itself specifies it means reporting an event to the test results. 

What is GetRoProperty in QTP?

- The GetRoproperty is used basically for the following two tasks:
  1. For returning the run time value or the current value of the test object property from the objects present in the software system or application.
  2. For retrieving the current property value during the run session of the object present in the software system or application.
- Actually GetRoProperty is one of the 4 methods provided by the quick test professional for working on the test object repositories and the other 3 are:
  1. GetToProperty
  2. SetToProperty
  3. GetToProperties
- Most of the developers often get confused with these methods and do not use the appropriate method for the situation. 
- For employing either of these methods, it is important that you should know and understand the details of the test object properties which can be identified by the quick test professional as a standard set of properties. 


No comments:

Facebook activity