In this article we are going to discuss regarding the two
main things namely:
- Reporter. Report event and
- 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:
- For reporting of the status of the results of the
tests like success, failure, warning, error and so on.
- For enabling or disabling reporting of the steps
that immediately follow the executed statement.
- For retrieving the folder path where the results
of the current tests can be stored.
- 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:
- Reporter event method
- Filter property
- 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:
- Mic Pass or 0: If the test step passes the run.
- Mic Fail or 1: If the test step fails the run.
- Mic done or 2: If the status of the test is not
affected by the run of the test step.
- 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:
- 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.
- 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:
- GetToProperty
- SetToProperty
- 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:
Post a Comment