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.
ReporterEvent Method:
I think this is a very common method used with Reporter object. I am sure even if you have worked on QTP for a relatively short period, you would have come across this.
Its syntax:
Reporter.ReportEvent EventStatus, ReportStepName, Details
where EventStatus can be:
0 or micPass: If this step runs test passes which is shown in test report.
1 or micFail: If this step runs test fails which is shown in test report.
2 or micDone: Used to send message to the test report and does not affect status of test.
3 or micWarning: Again, used to send warning message to the test report and does not affect status of test.
and
ReportStepName is name of step
and
Details are the user defined details for the given step.
For Example:
Reporter.ReportEvent micPass, "Login Authorization", "The user-defined step passed."
Filter property
I have mentioned this on my other post Some Useful Tips with QTP but would like to mention it again here since I get a lot of questions on this.
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.
Its syntax:
Reporter.Filter = NewMode
where NewMode can be:
0 or rfEnableAll: This is the default mode. All reported events are displayed in the Test Results.
1 or rfEnableErrorsAndWarnings: Only those events with a warning or fail status are displayed in the Test Results.
2 or rfEnableErrorsOnly: Only those events with a fail status are displayed in the Test Results.
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.
Its syntax:
Path_of_Results = Reporter.ReportPath
RunStatus Property
This is used to get the current status of the run session
Its syntax:
Reporter.RunStatus
For Example:
if Reporter.RunStatus = 0 then flag=1;
Saturday, May 14, 2011
QTP Certification Dumps
for Technical interviews:
http://no1tutorial.com/
learn step by step technologies:
http://no1tutorial.com/
Q1. 'Browser navigation timeout' is in which tab of Test Settings (File->Settings) window.
A) PropertiesB) ResourcesC) WebD) Web Settings
Q2. How many tabs are there in Test Settings (File->Settings) window
A) 7B) 6C) 5D) 8
Q3. Identify the tabs in the Test Settings (File->Settings) window
A) Properties, Run, Resources, Parameters, Environment, Web, Recovery
B) Properties, Run, Resources, Parameters, Environment, WebSettings,Recovery
C) Properties, Run Options, Resources, Parameters, Environment, Web,Recovery
D) Properties, Run, Resources, Input Parameters, Environment, Web, Recovery
Q4. 'Generate Script' is in which tab of Test Settings (File->Settings)window
A) PropertiesB) WebC) ResourcesD) Recovery
Q5. The following are the four main columns in the Keyword view
A) Item, Operation, Value, CommentsB) Item, Operation, Value, DocumentationC) Item, Operation, Property, DocumentationD) Number, Operation, Value, Documentation
Q6. For each object and method in an Expert View statement, acorresponding row exists in the Keyword View.A) TrueB) FalseC) There is a problem with the statement.D) None of above
Q7. You can work on one or several function libraries at the same time.A) TrueB) False
Q8. You can insert additional steps on the test objects captured in the Active screen after the recording session. A) TrueB) False
Q9. The Active Screen enables you to parameterize object values andinsert checkpointsA) TrueB) False
Q10. A QTP user can increase or decrease the active screen informationsaved with the test.A) TrueB) False
Q11. The Information pane provides a list of............. in the test:A) Semantic errorsB) Syntax errorsC) Common errorsD) Logic errors
Q12. When we switch from Expert view to the Keyword view, QTPautomatically checks for syntax errors in the test and shows them in theinformation pane.A) TrueB) False
Q13. If the information pane is not open, QTP automatically opens it incase a syntax error is detected.A) TrueB) False
Q14. ..................... provides a list of the resources that arespecified in your test but cannot be found.A) Missing paneB) Missing Resources paneC) Resources paneD) Missing Items pane
Q15. Whenever you open a test or a function library, QTP automaticallychecks for the availability of specified resources.A) TrueB) False
Q16. The Data Table does not assists you in parameterizing your test.A) TrueB) False
Q17. Tabs in the Debug Viewer pane are:A) Watch, Variables, DebugB) Watch, Data, CommandC) Watch, Variables, CommandD) View, Variables, Command
Q18. ............... tab enables you to view the current value of anyvariable or VBScript expression.
A) Watch
B) VIew
C) Locate
D) Current
Q19. The .... tab displays the current value of all variables that havebeen recognized up to the last step performed in the run session.
A) View
B)Variables
C) Locate
D) Current
Q20. The .........tab enables you to run a line of script to set ormodify the current value of a variable or VBScript object in your testor function library.
A) View
B) Variables
C) Command
D) Current
Q21. Panes in QTP can have one of the following states—docked or floating.
A) True
B) False
Q22. Which of the following statement is True:
A) QuickTest enables you to open and work on one test at a time
B) QuickTest enables you to open and work on two tests at a time
C) QuickTest enables you to open and work on predefined number of testsat a time
D) QuickTest enables you to open and work on nine test at a time
Q23. Which of the following statement is True:
A) You can open and work on two function libraries simultaneously
B) You can open and work on multiple function libraries simultaneously
C) You can open and work on nine function libraries simultaneously
D) You can open and work on one function library at a time
Q24. You can open any function library, regardless of whether it isassociated with the currently open test.
A) True
B) False
Q25. You can work with multiple documents (test, component, orapplication area, function libraries) using the...... dialog box
A) Panes
B) Display
C) Show
D) Windows
http://no1tutorial.com/
learn step by step technologies:
http://no1tutorial.com/
Q1. 'Browser navigation timeout' is in which tab of Test Settings (File->Settings) window.
A) PropertiesB) ResourcesC) WebD) Web Settings
Q2. How many tabs are there in Test Settings (File->Settings) window
A) 7B) 6C) 5D) 8
Q3. Identify the tabs in the Test Settings (File->Settings) window
A) Properties, Run, Resources, Parameters, Environment, Web, Recovery
B) Properties, Run, Resources, Parameters, Environment, WebSettings,Recovery
C) Properties, Run Options, Resources, Parameters, Environment, Web,Recovery
D) Properties, Run, Resources, Input Parameters, Environment, Web, Recovery
Q4. 'Generate Script' is in which tab of Test Settings (File->Settings)window
A) PropertiesB) WebC) ResourcesD) Recovery
Q5. The following are the four main columns in the Keyword view
A) Item, Operation, Value, CommentsB) Item, Operation, Value, DocumentationC) Item, Operation, Property, DocumentationD) Number, Operation, Value, Documentation
Q6. For each object and method in an Expert View statement, acorresponding row exists in the Keyword View.A) TrueB) FalseC) There is a problem with the statement.D) None of above
Q7. You can work on one or several function libraries at the same time.A) TrueB) False
Q8. You can insert additional steps on the test objects captured in the Active screen after the recording session. A) TrueB) False
Q9. The Active Screen enables you to parameterize object values andinsert checkpointsA) TrueB) False
Q10. A QTP user can increase or decrease the active screen informationsaved with the test.A) TrueB) False
Q11. The Information pane provides a list of............. in the test:A) Semantic errorsB) Syntax errorsC) Common errorsD) Logic errors
Q12. When we switch from Expert view to the Keyword view, QTPautomatically checks for syntax errors in the test and shows them in theinformation pane.A) TrueB) False
Q13. If the information pane is not open, QTP automatically opens it incase a syntax error is detected.A) TrueB) False
Q14. ..................... provides a list of the resources that arespecified in your test but cannot be found.A) Missing paneB) Missing Resources paneC) Resources paneD) Missing Items pane
Q15. Whenever you open a test or a function library, QTP automaticallychecks for the availability of specified resources.A) TrueB) False
Q16. The Data Table does not assists you in parameterizing your test.A) TrueB) False
Q17. Tabs in the Debug Viewer pane are:A) Watch, Variables, DebugB) Watch, Data, CommandC) Watch, Variables, CommandD) View, Variables, Command
Q18. ............... tab enables you to view the current value of anyvariable or VBScript expression.
A) Watch
B) VIew
C) Locate
D) Current
Q19. The .... tab displays the current value of all variables that havebeen recognized up to the last step performed in the run session.
A) View
B)Variables
C) Locate
D) Current
Q20. The .........tab enables you to run a line of script to set ormodify the current value of a variable or VBScript object in your testor function library.
A) View
B) Variables
C) Command
D) Current
Q21. Panes in QTP can have one of the following states—docked or floating.
A) True
B) False
Q22. Which of the following statement is True:
A) QuickTest enables you to open and work on one test at a time
B) QuickTest enables you to open and work on two tests at a time
C) QuickTest enables you to open and work on predefined number of testsat a time
D) QuickTest enables you to open and work on nine test at a time
Q23. Which of the following statement is True:
A) You can open and work on two function libraries simultaneously
B) You can open and work on multiple function libraries simultaneously
C) You can open and work on nine function libraries simultaneously
D) You can open and work on one function library at a time
Q24. You can open any function library, regardless of whether it isassociated with the currently open test.
A) True
B) False
Q25. You can work with multiple documents (test, component, orapplication area, function libraries) using the...... dialog box
A) Panes
B) Display
C) Show
D) Windows
Subscribe to:
Posts (Atom)