1. What are the various utilities and tools available in QTP?
QTP Contains the following utilities and tools that assist you with the testing process:
Password Encoder. Opens the Password Encoder dialog box, which enables you to encode
passwords. You can use the resulting strings as method arguments or Data Table parameter values (tests only).
Remote Agent. Activates the QTP Remote Agent, which determines how QTP behaves when a test is run by a remote application such as Quality Center.
Silent Test Runner. (Relevant only for tests) Opens the Silent Test Runner dialog box, which enables you to run a QTP test the way it is run from LoadRunner and Business Availability Center.
Test Batch Runner. (Relevant only for tests) Opens the Test Batch Runner dialog box, which enables you to set up QTP to run several tests in succession.
Test Results Deletion Tool. Opens the Test Results Deletion Tool dialog box, which enables you to delete unwanted or obsolete results from your system according to specific criteria that you define.
Action Conversion Tool. Enables you to convert test actions that were created using QTP Professional to scripted components for use in business process testing. For more information, click the Help button in the Action Conversion Tool window.
License Validation Utility. Opens the License Validation utility, which enables you to retrieve and validate license information.
Register New Browser Control. Opens the Register Browser Control Utility, which enables you to register your browser control application so that QTP Professional recognizes your Web object when recording or running tests.
Business Component Upgrade Tool. Opens the Business Component Upgrade Tool, if you are connected to a Quality Center project. This tool enables you to upgrade all of the business components in a Quality Center project, from an earlier component version to the format required by the current version. For more information, click the Help button in the Business Component Upgrade Tool window.
QTP Script Editor. Opens the QTP Script Editor, which enables you to open and modify the scripts of multiple tests and function libraries, simultaneously.
Mercury Micro Player. Opens the Mercury Micro Player, which enables you to view captured movies of a run session without opening QTP.
QTP Contains the following utilities and tools that assist you with the testing process:
Password Encoder. Opens the Password Encoder dialog box, which enables you to encode
passwords. You can use the resulting strings as method arguments or Data Table parameter values (tests only).
Remote Agent. Activates the QTP Remote Agent, which determines how QTP behaves when a test is run by a remote application such as Quality Center.
Silent Test Runner. (Relevant only for tests) Opens the Silent Test Runner dialog box, which enables you to run a QTP test the way it is run from LoadRunner and Business Availability Center.
Test Batch Runner. (Relevant only for tests) Opens the Test Batch Runner dialog box, which enables you to set up QTP to run several tests in succession.
Test Results Deletion Tool. Opens the Test Results Deletion Tool dialog box, which enables you to delete unwanted or obsolete results from your system according to specific criteria that you define.
Action Conversion Tool. Enables you to convert test actions that were created using QTP Professional to scripted components for use in business process testing. For more information, click the Help button in the Action Conversion Tool window.
License Validation Utility. Opens the License Validation utility, which enables you to retrieve and validate license information.
Register New Browser Control. Opens the Register Browser Control Utility, which enables you to register your browser control application so that QTP Professional recognizes your Web object when recording or running tests.
Business Component Upgrade Tool. Opens the Business Component Upgrade Tool, if you are connected to a Quality Center project. This tool enables you to upgrade all of the business components in a Quality Center project, from an earlier component version to the format required by the current version. For more information, click the Help button in the Business Component Upgrade Tool window.
QTP Script Editor. Opens the QTP Script Editor, which enables you to open and modify the scripts of multiple tests and function libraries, simultaneously.
Mercury Micro Player. Opens the Mercury Micro Player, which enables you to view captured movies of a run session without opening QTP.
2. What are the various ways of generating Statements in Expert View?
Generating Statements in the Expert View or a Function Library
You can generate statements in the following ways:
• You can use the Step Generator to add steps that use methods and functions.
• You can manually insert VBScript statements that use methods to perform operations. QTP includes IntelliSense, a statement completion feature that helps you select the test object (tests only), method, property, or collection (tests only) for your statement and to view the relevant syntax as you type in the Expert View or a function library.
• When you start to type a VBScript keyword in the Expert View or a function library, QTP automatically adds the relevant syntax or blocks to your script, if the Auto-expand VBScript syntax option is enabled.
Generating a Statement for an Object
When you type in the Expert View or a function library, IntelliSense (the statement completion feature included with QTP) enables you to select the test object (tests only), method, property, or collection (tests only) for your statement from a drop-down list and view the relevant syntax.
The Statement Completion option is enabled by default. You can disable or enable this option in the Editor Options dialog box.
When the Statement Completion option is enabled:
• If you type an object followed by an open parenthesis ( , for example, Page(, QTP displays a list of all test objects of this type in the object repository. If there is only one object of this type in the object repository, QTP automatically enters its name in quotes after the open parenthesis. (Tests only)
• If you type a period after a test object in a statement, QTP displays a list of the relevant test objects (tests only), methods, properties, collections (tests only), and registered functions that you can add after the object you typed.
• If you type the name of a method or property, QTP displays a list of available methods and properties. Pressing CTRL+SPACE automatically completes the word if there is only one option, or highlights the first method or property (alphabetically) that matches the text you typed.
• If you type the name of a method or property, QTP displays the syntax for it, including its mandatory and optional arguments. When you add a step that uses a method or property, you must define a value for each mandatory argument associated with the method or property.
• If you press CTRL+SPACE, QTP displays a list of the relevant test objects (tests only), methods, properties, collections (tests only), VBScript functions, user-defined functions, VBScript constants, and utility objects that you can add. This list is displayed even if you typed an object that has not yet been added to the object repository. If the test contains a function, or is associated with a function library, the functions are also displayed in the list.
• If you use the Object property in your statement, if the object data is currently available in the Active screen (tests only) or the open application, QTP displays native methods and properties of any run-time object in your application.
To generate a statement using statement completion in the Expert View or a function library:
1. Confirm that the Statement completion option is selected (Tools > View Options > General tab).
2. Perform one of the following:
o If you are working in a function library, skip to step 4.
o If you are working in the Expert View, type an object followed by an open parenthesis (.

If there is only one object of this type in the object repository, QTP automatically enters its name in quotes after the open parenthesis. If more than one object of this type exists in the object repository, QTP displays them in a list.

3. Double-click an object in the list or use the arrow keys to choose an object and press ENTER. QTP inserts the object into the statement.
4. Perform one of the following:
o If you are working in the Expert View, type a period (.) after the object on which you want to perform the method.

o If you are working in a function library, type the full hierarchy of an object, for example:
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury).WebEdit("username").
5. Type a period (.) after the object description, for example ("username"). QTP displays a list of the available methods and properties for the object.
Tip: You can press CTRL+Space or choose Edit > Advanced > Complete Word after a period, or after you have begun to type a method or property name. QTP automatically completes the method or property name if only one method or property matches the text you typed. If more than one method or property matches the text, the first method or property (alphabetically) that matches the text you typed is highlighted.
6. Double-click a method or property in the list or use the arrow keys to choose a method or property and press ENTER. QTP inserts the method or property into the statement. If the method or property contains arguments, QTP displays the syntax of the method or property in a tooltip, as shown in this example from the Expert View.
In the above example, the Set method has one argument, called Text. The argument name represents the text to insert in the box.
Tip: You can also place the cursor on any method or function that contains arguments and press CTRL+SHIFT+SPACE or choose Edit > Advanced > Argument Info to display the statement completion (argument syntax) tooltip for that item.
7. Enter the method arguments after the method according to the displayed syntax.
Note: After you have added a step in the Expert View, you can view the new step in the Keyword View. If the statement that you added in the Expert View contains syntax errors, QTP displays the errors in the Information pane when you select the Keyword View.
Automatically Completing VBScript Syntax
When the Auto-expand VBScript syntax option is enabled and you start to type a VBScript keyword in the Expert View or a function library, QTP automatically recognizes the first two characters of the keyword and adds the relevant VBScript syntax or blocks to the script. For example, if you enter the letters if and then enter a space at the beginning of a line, QTP automatically enters:
If Then
End If
The Auto-expand VBScript syntax option is enabled by default. You can disable or enable this option in the Editor Options dialog box.
If you enter two characters that are the initial characters of multiple keywords, the Select a Keyword dialog box is displayed and you can select the keyword you want. For example, if you enter the letters pr and then enter a space, the Select a Keyword dialog box opens containing the keywords private and property.
You can then select a keyword from the list and click OK. QTP automatically enters the relevant VBScript syntax or block in the script.
Generating Statements in the Expert View or a Function Library
You can generate statements in the following ways:
• You can use the Step Generator to add steps that use methods and functions.
• You can manually insert VBScript statements that use methods to perform operations. QTP includes IntelliSense, a statement completion feature that helps you select the test object (tests only), method, property, or collection (tests only) for your statement and to view the relevant syntax as you type in the Expert View or a function library.
• When you start to type a VBScript keyword in the Expert View or a function library, QTP automatically adds the relevant syntax or blocks to your script, if the Auto-expand VBScript syntax option is enabled.
Generating a Statement for an Object
When you type in the Expert View or a function library, IntelliSense (the statement completion feature included with QTP) enables you to select the test object (tests only), method, property, or collection (tests only) for your statement from a drop-down list and view the relevant syntax.
The Statement Completion option is enabled by default. You can disable or enable this option in the Editor Options dialog box.
When the Statement Completion option is enabled:
• If you type an object followed by an open parenthesis ( , for example, Page(, QTP displays a list of all test objects of this type in the object repository. If there is only one object of this type in the object repository, QTP automatically enters its name in quotes after the open parenthesis. (Tests only)
• If you type a period after a test object in a statement, QTP displays a list of the relevant test objects (tests only), methods, properties, collections (tests only), and registered functions that you can add after the object you typed.
• If you type the name of a method or property, QTP displays a list of available methods and properties. Pressing CTRL+SPACE automatically completes the word if there is only one option, or highlights the first method or property (alphabetically) that matches the text you typed.
• If you type the name of a method or property, QTP displays the syntax for it, including its mandatory and optional arguments. When you add a step that uses a method or property, you must define a value for each mandatory argument associated with the method or property.
• If you press CTRL+SPACE, QTP displays a list of the relevant test objects (tests only), methods, properties, collections (tests only), VBScript functions, user-defined functions, VBScript constants, and utility objects that you can add. This list is displayed even if you typed an object that has not yet been added to the object repository. If the test contains a function, or is associated with a function library, the functions are also displayed in the list.
• If you use the Object property in your statement, if the object data is currently available in the Active screen (tests only) or the open application, QTP displays native methods and properties of any run-time object in your application.
To generate a statement using statement completion in the Expert View or a function library:
1. Confirm that the Statement completion option is selected (Tools > View Options > General tab).
2. Perform one of the following:
o If you are working in a function library, skip to step 4.
o If you are working in the Expert View, type an object followed by an open parenthesis (.

If there is only one object of this type in the object repository, QTP automatically enters its name in quotes after the open parenthesis. If more than one object of this type exists in the object repository, QTP displays them in a list.

3. Double-click an object in the list or use the arrow keys to choose an object and press ENTER. QTP inserts the object into the statement.
4. Perform one of the following:
o If you are working in the Expert View, type a period (.) after the object on which you want to perform the method.

o If you are working in a function library, type the full hierarchy of an object, for example:
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury).WebEdit("username").
5. Type a period (.) after the object description, for example ("username"). QTP displays a list of the available methods and properties for the object.
Tip: You can press CTRL+Space or choose Edit > Advanced > Complete Word after a period, or after you have begun to type a method or property name. QTP automatically completes the method or property name if only one method or property matches the text you typed. If more than one method or property matches the text, the first method or property (alphabetically) that matches the text you typed is highlighted.6. Double-click a method or property in the list or use the arrow keys to choose a method or property and press ENTER. QTP inserts the method or property into the statement. If the method or property contains arguments, QTP displays the syntax of the method or property in a tooltip, as shown in this example from the Expert View.
In the above example, the Set method has one argument, called Text. The argument name represents the text to insert in the box.Tip: You can also place the cursor on any method or function that contains arguments and press CTRL+SHIFT+SPACE or choose Edit > Advanced > Argument Info to display the statement completion (argument syntax) tooltip for that item.
7. Enter the method arguments after the method according to the displayed syntax.
Note: After you have added a step in the Expert View, you can view the new step in the Keyword View. If the statement that you added in the Expert View contains syntax errors, QTP displays the errors in the Information pane when you select the Keyword View. Automatically Completing VBScript Syntax
When the Auto-expand VBScript syntax option is enabled and you start to type a VBScript keyword in the Expert View or a function library, QTP automatically recognizes the first two characters of the keyword and adds the relevant VBScript syntax or blocks to the script. For example, if you enter the letters if and then enter a space at the beginning of a line, QTP automatically enters:
If Then
End If
The Auto-expand VBScript syntax option is enabled by default. You can disable or enable this option in the Editor Options dialog box.
If you enter two characters that are the initial characters of multiple keywords, the Select a Keyword dialog box is displayed and you can select the keyword you want. For example, if you enter the letters pr and then enter a space, the Select a Keyword dialog box opens containing the keywords private and property.
You can then select a keyword from the list and click OK. QTP automatically enters the relevant VBScript syntax or block in the script.3. What are the various ways to insert a Action in a test in QTP?
There are three ways to insert a Action in a test
1. Insert Call to New:
Creates a new action and adds a call to the same. Provide the name "Cancel Ticket" in the "Name" field and click on OK button.
Adds below line to the code:
RunAction "Cancel Ticket", oneIteration
2. Actions - Insert Call to Existing
i. Insert Call to Existing – User to insert call to a re-usable action located within the same test or some other test
ii. This inserts the call to the existing action. In case the action in present in some other test case then a read only copy of action is inserted
3. Actions – Insert Call to Copy
i. Insert Call to Copy - Inserts call to an existing re-usable action and creates an editable copy of that action
ii. Actions cannot be deleted from a Test from Expert view. To delete a action one must go to the keyword view and delete the action
iii. An action call cannot be inserted directly by writing code in Expert View, it has to be added through the GUI first.
There are three ways to insert a Action in a test
1. Insert Call to New:
Creates a new action and adds a call to the same. Provide the name "Cancel Ticket" in the "Name" field and click on OK button.
Adds below line to the code:
RunAction "Cancel Ticket", oneIteration
2. Actions - Insert Call to Existing
i. Insert Call to Existing – User to insert call to a re-usable action located within the same test or some other test
ii. This inserts the call to the existing action. In case the action in present in some other test case then a read only copy of action is inserted
3. Actions – Insert Call to Copy
i. Insert Call to Copy - Inserts call to an existing re-usable action and creates an editable copy of that action
ii. Actions cannot be deleted from a Test from Expert view. To delete a action one must go to the keyword view and delete the action
iii. An action call cannot be inserted directly by writing code in Expert View, it has to be added through the GUI first.
4. Can I increase or decrease Active Screen information after I finish recording a test?
If you find that the information saved in the Active Screen after recording is not sufficient for your test editing needs, or if you no longer need Active Screen information, and you want to decrease the size of your test, there are several methods of changing the amount of Active Screen information saved with your test.
• To decrease the disk space used by your test, you can delete Active Screen information by selecting Save As, and clearing the Save Active Screen files check box.
• If you chose not to save all information in the Active Screen when testing a Windows application, you can use one of several methods to increase the information stored in the Active Screen.
Confirm that the Active Screen capture preference in the Active Screen tab of the Options dialog box is set to capture the amount of information you need and then:
o Perform an Update Run Mode operation to save the required amount of information in the Active Screen for all existing steps.
o Re-record the steps containing the objects you want to add to the Active Screen.
To re-record the step, select the step after which you want to record your step, position your application to match the selected location in your test, and then begin recording. Alternatively, place a breakpoint in your test at the step before which you want to add a step and run your test to the breakpoint. This brings your application to the point from which to record the step
If you find that the information saved in the Active Screen after recording is not sufficient for your test editing needs, or if you no longer need Active Screen information, and you want to decrease the size of your test, there are several methods of changing the amount of Active Screen information saved with your test.
• To decrease the disk space used by your test, you can delete Active Screen information by selecting Save As, and clearing the Save Active Screen files check box.
• If you chose not to save all information in the Active Screen when testing a Windows application, you can use one of several methods to increase the information stored in the Active Screen.
Confirm that the Active Screen capture preference in the Active Screen tab of the Options dialog box is set to capture the amount of information you need and then:
o Perform an Update Run Mode operation to save the required amount of information in the Active Screen for all existing steps.
o Re-record the steps containing the objects you want to add to the Active Screen.
To re-record the step, select the step after which you want to record your step, position your application to match the selected location in your test, and then begin recording. Alternatively, place a breakpoint in your test at the step before which you want to add a step and run your test to the breakpoint. This brings your application to the point from which to record the step
5. What are the ways by which we can make QTP to wait?
There are several options that you can use to synchronize your QTP test:
• You can insert a synchronization point, which instructs QTP to pause the test until an object property achieves the value you specify. When you insert a synchronization point into your test, QTP generates a WaitProperty statement in the Expert View.
• You can insert Exist or Wait statements that instruct QTP to wait until an object exists or to wait a specified amount of time before continuing the test.
• You can modify the default amount of time that QTP waits for a Web page to load.
• When working with tests, you can increase the default timeout settings for a test to instruct QTP to allow more time for objects to appear.
There are several options that you can use to synchronize your QTP test:
• You can insert a synchronization point, which instructs QTP to pause the test until an object property achieves the value you specify. When you insert a synchronization point into your test, QTP generates a WaitProperty statement in the Expert View.
• You can insert Exist or Wait statements that instruct QTP to wait until an object exists or to wait a specified amount of time before continuing the test.
• You can modify the default amount of time that QTP waits for a Web page to load.
• When working with tests, you can increase the default timeout settings for a test to instruct QTP to allow more time for objects to appear.
For More questions: http://futurethoughtsllc.com/InterviewQuestionsandAnswers.aspx
6. What are various types of properties when using Object Identification in QTP?
1. Mandatory properties are properties that QTP always learns for a particular test object class.
2. Assistive properties are properties that QTP learns only if the mandatory properties that QTP learns for a particular object in your application are not sufficient to create a unique description. If several assistive properties are defined for an object class, then QTP learns one assistive property at a time, and stops as soon as it creates a unique description for the object. If QTP does learn assistive properties, those properties are added to the test object description.
3. ordinal Identifier: If the combination of all defined mandatory and assistive properties is not sufficient to create a unique test object description, QTP also learns the value for the selected ordinal identifier.
1. Mandatory properties are properties that QTP always learns for a particular test object class.
2. Assistive properties are properties that QTP learns only if the mandatory properties that QTP learns for a particular object in your application are not sufficient to create a unique description. If several assistive properties are defined for an object class, then QTP learns one assistive property at a time, and stops as soon as it creates a unique description for the object. If QTP does learn assistive properties, those properties are added to the test object description.
3. ordinal Identifier: If the combination of all defined mandatory and assistive properties is not sufficient to create a unique test object description, QTP also learns the value for the selected ordinal identifier.
7. What happens if we don't use Synchronization Point in QTP?
If we are not giving synchronization point when tool execute the next page script it show an error page not found.navigation:insert menu-step-synchronization point2-wait():here we are giving fixed waiting to the tool3-increasing time out:b default QTP maintains 20000milisecond to identify object. if it is taking more time to identify all the objects then we have to increase the time out.navigation:tool-option-run tab increase our time there in ms.
If we are not giving synchronization point when tool execute the next page script it show an error page not found.navigation:insert menu-step-synchronization point2-wait():here we are giving fixed waiting to the tool3-increasing time out:b default QTP maintains 20000milisecond to identify object. if it is taking more time to identify all the objects then we have to increase the time out.navigation:tool-option-run tab increase our time there in ms.
8. What happens in case Smart Identification fails to identify the object in QTP?
If the Smart Identification mechanism cannot successfully identify the object, QTP uses the learned description plus the ordinal identifier to identify the object.
If the object is still not identified, the test fails and a normal failed step is displayed in the results.
If the Smart Identification mechanism cannot successfully identify the object, QTP uses the learned description plus the ordinal identifier to identify the object.
If the object is still not identified, the test fails and a normal failed step is displayed in the results.
9. What is a Bitmap Check Point in QTP?
You can check an area of a Web page or application as a bitmap. While creating a test, you specify the area you want to check by selecting an object. You can check an entire object or any area within an object. QTP captures the visible part of the specified object as a bitmap (QTP does not capture any part that is scrolled off of the screen, for example), and inserts a checkpoint in the test. You can choose to save the entire object with your test, or you can choose to save only the selected area of the object with your test to save disk space.
When you run the test, QTP compares the object or selected area of the object currently displayed on the Web page or application with the bitmap stored when the test was recorded. If there are differences, QTP captures a bitmap of the actual object and displays it with the expected bitmap in the details portion of the Test Results window. By comparing the two bitmaps (expected and actual), you can identify the nature of the discrepancy.
To create a bitmap checkpoint while recording:
1. Choose Insert > Checkpoint > Bitmap Checkpoint, or click the Insert Checkpoint or Output Value button and choose Bitmap Checkpoint.
The QTP window is hidden, and the pointer turns into a pointing hand.
Note: If the object you want to check can only be displayed by performing an event (such as such as right-clicking or moving the pointer over an object to display a context menu), hold the left CTRL key. The pointing hand temporarily turns into a standard pointer and you can perform the event. When the object you want to check is displayed, release the left CTRL key.
The pointer becomes a pointing hand again. You can also use the left CTRL key to change the window focus. Additionally, if the window containing the object you want to select is minimized, you can display it by holding the left CTRL key, right-clicking the application in the Windows task bar, and choosing Restore from the context menu.
2. Click an object to check in your Web page or application.
You can check an area of a Web page or application as a bitmap. While creating a test, you specify the area you want to check by selecting an object. You can check an entire object or any area within an object. QTP captures the visible part of the specified object as a bitmap (QTP does not capture any part that is scrolled off of the screen, for example), and inserts a checkpoint in the test. You can choose to save the entire object with your test, or you can choose to save only the selected area of the object with your test to save disk space.
When you run the test, QTP compares the object or selected area of the object currently displayed on the Web page or application with the bitmap stored when the test was recorded. If there are differences, QTP captures a bitmap of the actual object and displays it with the expected bitmap in the details portion of the Test Results window. By comparing the two bitmaps (expected and actual), you can identify the nature of the discrepancy.
To create a bitmap checkpoint while recording:
1. Choose Insert > Checkpoint > Bitmap Checkpoint, or click the Insert Checkpoint or Output Value button and choose Bitmap Checkpoint.
The QTP window is hidden, and the pointer turns into a pointing hand.
Note: If the object you want to check can only be displayed by performing an event (such as such as right-clicking or moving the pointer over an object to display a context menu), hold the left CTRL key. The pointing hand temporarily turns into a standard pointer and you can perform the event. When the object you want to check is displayed, release the left CTRL key.
The pointer becomes a pointing hand again. You can also use the left CTRL key to change the window focus. Additionally, if the window containing the object you want to select is minimized, you can display it by holding the left CTRL key, right-clicking the application in the Windows task bar, and choosing Restore from the context menu.
2. Click an object to check in your Web page or application.
10. What is a Checkpoint?
QTP enables you to add checks to your test. A checkpoint is a verification point that compares a current value for a specified property with the expected value for that property. This enables you to identify whether your Web site or application is functioning correctly.
When you add a checkpoint, QTP adds a checkpoint to the current row in the Keyword View and adds a Check CheckPoint statement in the Expert View. By default, the checkpoint name receives the name of the test object on which the checkpoint is being performed. You can choose to specify a different name for the checkpoint or accept the default name.
When you run the test, QTP compares the expected results of the checkpoint to the current results. If the results do not match, the checkpoint fails. You can view the results of the checkpoint in the Test Results window.
Tip: You can also use the CheckProperty method and the CheckItemProperty method to check specific property or item property values.
For More questions: http://futurethoughtsllc.com/InterviewQuestionsandAnswers.aspx
QTP enables you to add checks to your test. A checkpoint is a verification point that compares a current value for a specified property with the expected value for that property. This enables you to identify whether your Web site or application is functioning correctly.
When you add a checkpoint, QTP adds a checkpoint to the current row in the Keyword View and adds a Check CheckPoint statement in the Expert View. By default, the checkpoint name receives the name of the test object on which the checkpoint is being performed. You can choose to specify a different name for the checkpoint or accept the default name.
When you run the test, QTP compares the expected results of the checkpoint to the current results. If the results do not match, the checkpoint fails. You can view the results of the checkpoint in the Test Results window.
Tip: You can also use the CheckProperty method and the CheckItemProperty method to check specific property or item property values.
For More questions: http://futurethoughtsllc.com/InterviewQuestionsandAnswers.aspx
11. What is a Database Check Point in QTP?
You can use database checkpoints in your test to check databases accessed by your Web site or application, and to detect defects. To do this, you define a query on your database. Then you create a database checkpoint that checks the results of the query.
You can define a database query in the following ways:
• Using Microsoft Query. You can install Microsoft Query from the custom installation of Microsoft Office.
• By manually defining an SQL statement.
You can use database checkpoints in your test to check databases accessed by your Web site or application, and to detect defects. To do this, you define a query on your database. Then you create a database checkpoint that checks the results of the query.
You can define a database query in the following ways:
• Using Microsoft Query. You can install Microsoft Query from the custom installation of Microsoft Office.
• By manually defining an SQL statement.
12. What is a Function Library?
You can create function libraries in QTP and call their functions from an action in your test. A function library is a separate QTP document containing VBscript functions, subroutines, modules, and so forth. Each function library opens in a separate window, enabling you to open and work on one or several function libraries at the same time. After you finish editing a function library, you can close it, leaving your QTP session open. You can also close all open function libraries simultaneously.
By implementing user-defined functions in function libraries and associating them with your test, you and other users can choose functions that perform complex operations, such as adding if/then statements and loops to test steps, or working with utility objects—without adding the code directly to the test. In addition, you save time and resources by implementing and using reusable functions.
QTP provides tools that enable you to edit and debug any function library, even if it was created using an external editor. For example, QTP can check the syntax of your functions, and the function library window provides the same editing features that are available in the Expert View.
For More questions: http://futurethoughtsllc.com/InterviewQuestionsandAnswers.aspx
You can create function libraries in QTP and call their functions from an action in your test. A function library is a separate QTP document containing VBscript functions, subroutines, modules, and so forth. Each function library opens in a separate window, enabling you to open and work on one or several function libraries at the same time. After you finish editing a function library, you can close it, leaving your QTP session open. You can also close all open function libraries simultaneously.
By implementing user-defined functions in function libraries and associating them with your test, you and other users can choose functions that perform complex operations, such as adding if/then statements and loops to test steps, or working with utility objects—without adding the code directly to the test. In addition, you save time and resources by implementing and using reusable functions.
QTP provides tools that enable you to edit and debug any function library, even if it was created using an external editor. For example, QTP can check the syntax of your functions, and the function library window provides the same editing features that are available in the Expert View.
For More questions: http://futurethoughtsllc.com/InterviewQuestionsandAnswers.aspx
13. How can I remove test result files from old tests?
You can use the Test Results Deletion Tool to view a list of all of the test results in a specific location in your file system or in your Quality Center project. You can then delete any test results that you no longer require.
The Test Results Deletion Tool enables you to sort the test results by name, date, size, and so forth, so that you can easily identify the results you want to delete.
To open this utility, choose Start > Programs > QTP Professional > Tools > Test Results Deletion Tool.
You can use the Test Results Deletion Tool to view a list of all of the test results in a specific location in your file system or in your Quality Center project. You can then delete any test results that you no longer require.
The Test Results Deletion Tool enables you to sort the test results by name, date, size, and so forth, so that you can easily identify the results you want to delete.
To open this utility, choose Start > Programs > QTP Professional > Tools > Test Results Deletion Tool.
14. What is a Image Check Point in QTP?
Image Checkpoint checks the value of an image in your application or Web page. For example, you can check that a selected image's source file is correct.
Note: You create an image checkpoint by inserting a standard checkpoint on an image object.
Image Checkpoint checks the value of an image in your application or Web page. For example, you can check that a selected image's source file is correct.
Note: You create an image checkpoint by inserting a standard checkpoint on an image object.
15. What is a Page Check Point in QTP?
Page Checkpoint checks the characteristics of a Web page. For example, you can check how long a Web page takes to load or whether a Web page contains broken links.
Note: You create a page checkpoint by inserting a standard checkpoint on a page object.
Page checkpoints are supported for the Web add-in environment
Page Checkpoint checks the characteristics of a Web page. For example, you can check how long a Web page takes to load or whether a Web page contains broken links.
Note: You create a page checkpoint by inserting a standard checkpoint on a page object.
Page checkpoints are supported for the Web add-in environment
16. What is a Recovery Scenario?
You create recovery scenarios using the Recovery Scenario Wizard (accessed from the Recovery Scenario Manager dialog box). The Recovery Scenario Wizard leads you through the process of defining each of the stages of a recovery scenario. As you create your recovery scenarios, you save them in a recovery file. A recovery file is a convenient way to organize and store multiple recovery scenarios together.
Using the Recovery Scenario Manager dialog box, you can then select any recovery file to manage all of the recovery scenarios stored in that file. This enables you to edit a selected recovery scenario, associate specific recovery scenarios with specific tests or components to instruct QTP to implement the recovery scenarios when specified trigger events occur, and so forth.
http://futurethoughtsllc.com/QTPInterviewQuestionsAnswers.aspx
You create recovery scenarios using the Recovery Scenario Wizard (accessed from the Recovery Scenario Manager dialog box). The Recovery Scenario Wizard leads you through the process of defining each of the stages of a recovery scenario. As you create your recovery scenarios, you save them in a recovery file. A recovery file is a convenient way to organize and store multiple recovery scenarios together.
Using the Recovery Scenario Manager dialog box, you can then select any recovery file to manage all of the recovery scenarios stored in that file. This enables you to edit a selected recovery scenario, associate specific recovery scenarios with specific tests or components to instruct QTP to implement the recovery scenarios when specified trigger events occur, and so forth.
http://futurethoughtsllc.com/QTPInterviewQuestionsAnswers.aspx
17. What is a Regular Expression?
Regular expressions enable QTP to identify objects and text strings with varying values. You can use regular expressions when:
• defining the property values of an object in dialog boxes or in programmatic descriptions
• parameterizing a step
• 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.
A regular expression is a string that specifies a complex search phrase. By using special characters, such as a period (.), asterisk (*), caret (^), and brackets ([ ]), you can define the conditions of a search.
Notes:
• You can use regular expressions only for values of type string.
• When any special character in a regular expression is preceded by a backslash (\), QTP searches for the literal character.
Regular expressions enable QTP to identify objects and text strings with varying values. You can use regular expressions when:
• defining the property values of an object in dialog boxes or in programmatic descriptions
• parameterizing a step
• 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.
A regular expression is a string that specifies a complex search phrase. By using special characters, such as a period (.), asterisk (*), caret (^), and brackets ([ ]), you can define the conditions of a search.
Notes:
• You can use regular expressions only for values of type string.
• When any special character in a regular expression is preceded by a backslash (\), QTP searches for the literal character.
18. I am testing localized versions of a single application, each with localized user interface strings. How do I create efficient tests in QTP?
You can parameterize these user interface strings using parameters from the global Environment variable list. This is a list of variables and corresponding values that can be accessed from any test.
You can parameterize these user interface strings using parameters from the global Environment variable list. This is a list of variables and corresponding values that can be accessed from any test.
19. What is a Run-Time Data Table in QTP?
During the run session, QTP creates a run-time Data Table—a live version of the Data Table associated with your test. During the run session, QTP displays the run-time data in the Data Table pane so that you can see any changes to the Data Table as they occur.
When the run session ends, the run-time Data Table closes, and the Data Table pane again displays the stored design-time Data Table. Data entered in the run-time Data Table during the run session is not saved with the test. The final data from the run-time Data Table is displayed in the Run-Time Data Table in the Test Results window
Tip: If it is important for you to save the resulting data from the run-time Data Table, you can insert a DataTable.Export statement to the end of your test to export the run-time Data Table to a file. You can then import the data to the design-time Data Table using the Data Table File > Import From File menu. Alternatively you can add a DataTable.Import statement to the beginning of your test to import the run-time Data Table that was exported at the end of the previous run session.
During the run session, QTP creates a run-time Data Table—a live version of the Data Table associated with your test. During the run session, QTP displays the run-time data in the Data Table pane so that you can see any changes to the Data Table as they occur.
When the run session ends, the run-time Data Table closes, and the Data Table pane again displays the stored design-time Data Table. Data entered in the run-time Data Table during the run session is not saved with the test. The final data from the run-time Data Table is displayed in the Run-Time Data Table in the Test Results window
Tip: If it is important for you to save the resulting data from the run-time Data Table, you can insert a DataTable.Export statement to the end of your test to export the run-time Data Table to a file. You can then import the data to the design-time Data Table using the Data Table File > Import From File menu. Alternatively you can add a DataTable.Import statement to the beginning of your test to import the run-time Data Table that was exported at the end of the previous run session.
20. What is a Standard Check Point in QTP?
Standard Checkpoint checks the property value of an object in your application or Web page. The standard checkpoint checks a variety of objects such as buttons, radio buttons, combo boxes, lists, and so forth. For example, you can check that a radio button is activated after it is selected or you can check the value of an edit box.
Standard checkpoints are supported for all add-in environments
http://futurethoughtsllc.com/QTPInterviewQuestionsAnswers.aspx
Standard Checkpoint checks the property value of an object in your application or Web page. The standard checkpoint checks a variety of objects such as buttons, radio buttons, combo boxes, lists, and so forth. For example, you can check that a radio button is activated after it is selected or you can check the value of an edit box.
Standard checkpoints are supported for all add-in environments
http://futurethoughtsllc.com/QTPInterviewQuestionsAnswers.aspx
21. What is a Synchronization Point in QTP?
When you run a test, your application may not always respond with the same speed. For example, it might take a few seconds:
• for a progress bar to reach 100%
• for a status message to appear
• for a button to become enabled
• for a window or pop-up message to open
You can handle these anticipated timing problems by synchronizing your test to ensure that QTP waits until your application is ready before performing a certain step.
There are several options that you can use to synchronize your test:
• You can insert a synchronization point, which instructs QTP to pause the test until an object property achieves the value you specify. When you insert a synchronization point into your test, QTP generates a WaitProperty statement in the Expert View.
• You can insert Exist or Wait statements that instruct QTP to wait until an object exists or to wait a specified amount of time before continuing the test.
• You can modify the default amount of time that QTP waits for a Web page to load.
• When working with tests, you can increase the default timeout settings for a test to instruct QTP to allow more time for objects to appear.
When you run a test, your application may not always respond with the same speed. For example, it might take a few seconds:
• for a progress bar to reach 100%
• for a status message to appear
• for a button to become enabled
• for a window or pop-up message to open
You can handle these anticipated timing problems by synchronizing your test to ensure that QTP waits until your application is ready before performing a certain step.
There are several options that you can use to synchronize your test:
• You can insert a synchronization point, which instructs QTP to pause the test until an object property achieves the value you specify. When you insert a synchronization point into your test, QTP generates a WaitProperty statement in the Expert View.
• You can insert Exist or Wait statements that instruct QTP to wait until an object exists or to wait a specified amount of time before continuing the test.
• You can modify the default amount of time that QTP waits for a Web page to load.
• When working with tests, you can increase the default timeout settings for a test to instruct QTP to allow more time for objects to appear.
22. What is a Table Check Point in QTP?
Table checkpoint checks information within a table. For example, suppose your application or Web site contains a table listing all available flights from New York to San Francisco. You can add a table checkpoint to check that the time of the first flight in the table is correct.
Note: You create a table checkpoint by inserting a standard checkpoint on a table object.
http://futurethoughtsllc.com/QTPInterviewQuestionsAnswers.aspx
Table checkpoint checks information within a table. For example, suppose your application or Web site contains a table listing all available flights from New York to San Francisco. You can add a table checkpoint to check that the time of the first flight in the table is correct.
Note: You create a table checkpoint by inserting a standard checkpoint on a table object.
http://futurethoughtsllc.com/QTPInterviewQuestionsAnswers.aspx
23. What is a Text Area Check Point in QTP?
Text Area Checkpoint checks that a text string is displayed within a defined area in a Windows application, according to specified criteria. For example, suppose your Visual Basic application has a button that says View Doc , where is replaced by the four digit code entered in a form elsewhere in the application. You can create a text area checkpoint to confirm that the number displayed on the button is the same as the number entered in the form.
Text area checkpoints are supported for Standard Windows, Visual Basic, and ActiveX add-in environments.
Text area checkpoints are also supported for some external add-in environments, such as Java.
Text Area Checkpoint checks that a text string is displayed within a defined area in a Windows application, according to specified criteria. For example, suppose your Visual Basic application has a button that says View Doc , where is replaced by the four digit code entered in a form elsewhere in the application. You can create a text area checkpoint to confirm that the number displayed on the button is the same as the number entered in the form.
Text area checkpoints are supported for Standard Windows, Visual Basic, and ActiveX add-in environments.
Text area checkpoints are also supported for some external add-in environments, such as Java.
24. What is a Text Check Point in QTP?
Text Checkpoint checks that a text string is displayed in the appropriate place on a Web page or application. For example, suppose a Web page displays the sentence Flight departing from New York to San Francisco. You can create a text checkpoint that checks that the words "New York" are displayed between "Flight departing from" and "to San Francisco".
Text checkpoints are supported for most add-in environments
Text Checkpoint checks that a text string is displayed in the appropriate place on a Web page or application. For example, suppose a Web page displays the sentence Flight departing from New York to San Francisco. You can create a text checkpoint that checks that the words "New York" are displayed between "Flight departing from" and "to San Francisco".
Text checkpoints are supported for most add-in environments
25. What is a Virtual Object in QTP?
Your application may contain objects that behave like standard objects but are not recognized by QTP. You can define these objects as virtual objects and map them to standard classes, such as a button or a check box. QTP emulates the user's action on the virtual object during the run session. In the test results, the virtual object is displayed as though it is a standard class object.
For example, suppose you want to record a test on a Web page containing a bitmap that the user clicks. The bitmap contains several different hyperlink areas, and each area opens a different destination page. When you record a test, the Web site matches the coordinates of the click on the bitmap and opens the destination page.
To enable QTP to click at the required coordinates during a run session, you can define a virtual object for an area of the bitmap, which includes those coordinates, and map it to the button class. When you run a test, QTP clicks the bitmap in the area defined as a virtual object so that the Web site opens the correct destination page.
You define a virtual object using the Virtual Object Wizard (Tools > Virtual Objects > New Virtual Object). The wizard prompts you to select the standard object class to which you want to map the virtual object. You then mark the boundaries of the virtual object using a crosshairs pointer. Next, you select a test object as the parent of the virtual object. Finally, you specify a name and a collection for the virtual object. A virtual object collection is a group of virtual objects that is stored in the Virtual Object Manager under a descriptive name.
Note: QTP does not support virtual objects for analog or low-level recording.
Your application may contain objects that behave like standard objects but are not recognized by QTP. You can define these objects as virtual objects and map them to standard classes, such as a button or a check box. QTP emulates the user's action on the virtual object during the run session. In the test results, the virtual object is displayed as though it is a standard class object.
For example, suppose you want to record a test on a Web page containing a bitmap that the user clicks. The bitmap contains several different hyperlink areas, and each area opens a different destination page. When you record a test, the Web site matches the coordinates of the click on the bitmap and opens the destination page.
To enable QTP to click at the required coordinates during a run session, you can define a virtual object for an area of the bitmap, which includes those coordinates, and map it to the button class. When you run a test, QTP clicks the bitmap in the area defined as a virtual object so that the Web site opens the correct destination page.
You define a virtual object using the Virtual Object Wizard (Tools > Virtual Objects > New Virtual Object). The wizard prompts you to select the standard object class to which you want to map the virtual object. You then mark the boundaries of the virtual object using a crosshairs pointer. Next, you select a test object as the parent of the virtual object. Finally, you specify a name and a collection for the virtual object. A virtual object collection is a group of virtual objects that is stored in the Virtual Object Manager under a descriptive name.
Note: QTP does not support virtual objects for analog or low-level recording.
26. Which scripting language used by QTP?
Most of the newbie are confuse about this. In many place you will find that QTP uses VBscript, java script and other scripting language.
Actually QTP is using only one language VB script. But it also provide access to its functions and properties thorough it object. That means you can use any other scripting language to access the QTP, but then you will not get the any benefit of its recording technique and other facilities provided by tool.
Most of the newbie are confuse about this. In many place you will find that QTP uses VBscript, java script and other scripting language.
Actually QTP is using only one language VB script. But it also provide access to its functions and properties thorough it object. That means you can use any other scripting language to access the QTP, but then you will not get the any benefit of its recording technique and other facilities provided by tool.
27. How many types of recording facility are available in QTP?
QTP provides three types of recording methods
a. Context Recording (Normal)
It's by default option in the
b. Low Level Recording
This records somewhat more events than the above one. for example, suppose there is a application with Editbox that requires some input. So if you are using normal recording it will only record the charcter keys only and at one after you press TAB or after you start any other event. But if you are using Analog recording it will recorded some of non charcter keys too, like backspace Left Arrow, Right Arrow, etc...
This is generally used when you are not able to record any of the object properly or when you want to record other events too.
c. Analog Recording
this is much more sensitive then above two. Means it is recording much more events than above two. Suppose if you have a application like MS paint and you want to record some drawing with mouse you will not be able to do this with the above two. You require this option to enable.
There is a problem with this kind of recording that you will not be able to edit it once it will be recorded.
QTP provides three types of recording methods
a. Context Recording (Normal)
It's by default option in the
b. Low Level Recording
This records somewhat more events than the above one. for example, suppose there is a application with Editbox that requires some input. So if you are using normal recording it will only record the charcter keys only and at one after you press TAB or after you start any other event. But if you are using Analog recording it will recorded some of non charcter keys too, like backspace Left Arrow, Right Arrow, etc...
This is generally used when you are not able to record any of the object properly or when you want to record other events too.
c. Analog Recording
this is much more sensitive then above two. Means it is recording much more events than above two. Suppose if you have a application like MS paint and you want to record some drawing with mouse you will not be able to do this with the above two. You require this option to enable.
There is a problem with this kind of recording that you will not be able to edit it once it will be recorded.
28. What is Page checkpoint and How to add a page checkpoint to your test?
The page checkpoint checks that the number of links and images in the page when you run your test is the same as when you recorded your test.
a. Locate the page where you want to add a page checkpoint.
b. Create a page checkpoint.
Right-click anywhere in the Active Screen, and choose Insert Standard Checkpoint. The Object Selection - Checkpoint Properties dialog box opens. Note that this dialog box may include different elements, depending on where you click in the Active Screen.
c. Save the test.
http://futurethoughtsllc.com/QTPInterviewQuestionsAnswers.aspx
The page checkpoint checks that the number of links and images in the page when you run your test is the same as when you recorded your test.
a. Locate the page where you want to add a page checkpoint.
b. Create a page checkpoint.
Right-click anywhere in the Active Screen, and choose Insert Standard Checkpoint. The Object Selection - Checkpoint Properties dialog box opens. Note that this dialog box may include different elements, depending on where you click in the Active Screen.
c. Save the test.
http://futurethoughtsllc.com/QTPInterviewQuestionsAnswers.aspx
29. What is the Diff between Image check-point and Bit map Check point?
Image Checkpoints checks the properties of the image and not the Actual image. So Through image check points you can verify it index, ALT Tag, URL of the image.
While the Bitmap check points actually checks the image Comparing bit by bit. Through this you can check the whole image or part of the image.
Image Checkpoints checks the properties of the image and not the Actual image. So Through image check points you can verify it index, ALT Tag, URL of the image.
While the Bitmap check points actually checks the image Comparing bit by bit. Through this you can check the whole image or part of the image.
30. How to close all the Internet expolere windows and their dialog boxes
SystemUtil.CloseProcessByName("IEXPLORE.exe")
SystemUtil.CloseProcessByName("IEXPLORE.exe")
ReplyDeleteI hope your Testing tools content has unique identity across the world. Each and every blog in your website is very informative users. I am eagerly waiting for the next content.
Loadrunner course in Chennai
Best Loadrunner training institute in chennai