Question 16- What is Smart Identification in QTP
Answer- Due to dynamic changes in properties QTP does not recognize the object with the help of the Properties present in the object repository then QTP use the special mechanism to identify the object smartly with base filter and optional filter properties. This mechanism is known as smart identification.
Due to this script does not fail but it proceeds ahead to compare the next property
Question 17- What is synchronization in QTP?
Answer- If you do not want QTP to perform a step or checkpoint until an object in your application achieves a certain status, you should insert a synchronization point to instruct QuickTest to pause the test until the object property achieves the value you specify (or until a specified timeout is exceeded).
So as a summary we can say, Synchronization makes available specific time for an object to process prior to moving on to next step.
Question 18- What are the Synchronization methods in QTP?
Answer- In QTP Synchronization can be inserted in three different ways:
1- By adding Synchronization Point. To add a synchronization point, Place cursor in desired location>keep tool under recording mode>Insert menu>Synchronization point >show the object >click ok>select property name & Value (True)>enter >click ok>Stop recording.
2- Increasing Default Checkout Time. To do this go to File menu--> Setting--> Run Tab--> Change timeout --> Click Apply--> Click OK.
3- Wait statement- pause the test for fixed time specified in the wait statement.
Syntax: Wait(time in seconds)
Question 19- Explain the checkpoints in QTP.
Answer- A checkpoint is a step that compares two values and reports the result. It captures the expected result of an Object while recording and compare with the expected results during run session. It returns the pass or fails status accordingly.
In QTP 9.2 following are checkpoints:
1- Standard Checkpoints: - It checks the state of an object property, such as button, checkbox, radio button, and combo boxes ECT. A Table check point can be created by inserting standard check point on table object. And in same way a page checkpoint can be created by inserting standard checkpoint on page object. And also an Image checkpoint can be created by inserting a standard checkpoint on an image object.
2- Text Checkpoints: - It checks the text displayed on your application or web page. Suppose you want to check this text "Host is created successfully", you can also create customized checkpoint like you can configure that checked text is "created", before text is "Host is" and after text is "successfully”.
3- Text Area Checkpoints: - It checks the text displayed on your application or web page on specific area. You can check existence of the text string on a particular area.
4- Bitmap Checkpoints: - It does a pixel to pixel comparison of an image or part of an image. Bitmap check point is rarely used, and mostly used on graphics websites and applications.
5- Database Checkpoints: - It checks the content of data base accessed by your application. You can check the whole database which resides in your web page using this checkpoint.
6- Accessibility Checkpoints: - Accessibility Checkpoint recognizes the areas of your Web Site that may not conform to the World Wide Consortium (W3C) Web Content Accessibility guidelines.
7- XML checkpoints (From Resource):- It checks the data content of XML documents in XML files or XML documents in Web pages and frames.
XML checkpoint (From Resource) - It is supported for all add-in environments. (web,vb,ActiveX)
XML checkpoint (From Application) - It is supported for only web add-in environment.
XML checkpoint (From Resource) - It is supported for all add-in environments. (web,vb,ActiveX)
XML checkpoint (From Application) - It is supported for only web add-in environment.
Question 20- What is difference between an image checkpoint and bitmap checkpoint.
Answer- Image checkpoint verify the properties of an Image in a web page..like the location of the Image in a web page is correct or not. Alos this is supported in web environment only.
Where Bitmap checkpoint verify the variation of the object between new build and old build. And this is supported in all testing environment.
Question 21- How we can identify if any checkpoint is failed.
Answer- A Failed checkpoint is indicated in the TEST Results with a red X. The TEST RESULTS will show the expected value and actual value of the property or properties Checked.
Question 22- What is use of regular expression in QTP?
Answer- Regular expressions enable QuickTest to identify objects and text strings with varying values. You can use regular expressions when:
1- Defining the property values of an object in dialog boxes or in programmatic descriptions
2- Parameterize a step
3- Creating checkpoints with varying values
For example, you can use a regular expression if you want to create a text checkpoint on a date text string, but the displayed date changes according to the current date. If you define the date as a regular expression, the checkpoint checks that the captured text string matches the expected date format, rather than checking the exact date value.
You can use regular expressions only for values of type string.
Question 23- What are the different types of parameters used in QTP?
Answer-
1- Input parameters: - Input parameters enable you to run a test using different sets of input values. Means, it allow you to replace a static value with dynamic placeholder (parameter). The values of input parameter are inputs into application from external data sources.
2- Output Parameters: - Enables you to to capture output values from the application at run-time. You can get a value from the application and store it in the QuickTest test Results. You can later use this value as an input to a variable. Capturing a value during run-time and using it as an input variable in your test is called data correlation.
3- Random Number parameters: - The random number input Parameter generates random numbers and uses them as input value for a parameter. By default, the random number ranges between 0 and 100.
4- Environment parameters: - ENVIRONMENT Parameters enable you to insert a value in your Test from an environment variable list. The value of an environment Parameter remains the same during the test playback, regardless of the number of Iterations, unless you change the value.
Question 24- What is an action and what types of actions are used in QTP?
Answer- Action is nothing but a piece of code/script written Test some part of functionality in the Application under test. Combination of Actions can be called as a test. These actions can be used in other tests if they need.
There are three types of action used in QTP:
1- Reusable action:- This can be used in any test by calling it into that test. Tester should create an action as Reusable if he thinks this can be used in other tests.
2- Non Reusable action:- This can be used in a single test. By default actions are non-reusable.
3- External action:- External Actions are those which are called from External Test and these Actions are Read-only. While re usable action can be called and modifies in a test.
Question 25- What is recovery scenario in QTP?
Answer: - While executing your scripts you may get some UNEXPECTED errors. To "recover" the test (and continue running) from these unexpected errors you use Recovery Scenarios.
Recovery scenarios are useful when it is difficult to predict at which step the errors can come or when we are confident that the error will not come in the QTP script, whereas it can be anywhere outside the QTP Script.
In order to handle such situations QTP comes to our rescue by creating recovery scenarios and associates them with the particular tests.
The Recovery Scenario Manager presents a structured wizard which helps us in defining the recovery scenario, like detailed definition of the unexpected event and the operations required to recover from the exception during the run session.
The events for we can use recovery scenarios:
1- Application Crash
2- Pop Up Window
3- Test Run Error
4- Object State
Question 26- What constitute Recovery Scenarios?
A recovery scenario consists of the following:
1- Trigger Event- The event that interrupts your run session. For example, a window that may pop up on screen, or a QTP run error.
2- Recovery Operations- The operations to perform to enable QTP to continue running the test after the trigger event interrupts the run session. For example, clicking an OK button in a pop-up window, or restarting Microsoft Windows.
3- Post-Recovery Test Run Option- The instructions on how QTP should proceed after the recovery operations have been performed, and from which point in the test QTP should continue, if at all. For example, you may want to restart a test from the beginning, or skip a step entirely and continue with the next step in the test.
No comments :
Post a Comment