http://quicktesthp.blogspot.com

QTP VBScript new series + Interview Question Bank on QTP for enrichment of Knowledge in QTP

This Site has been brought to you by HP Certified Expert of QTP.

Exciting new articles for October:

1) QTP Tip:Deselect all Radio Buttons

2) HP QTP Crypt Object

3)Adding Hyperlinks in Excel Spreadsheet

Best of Luck Friends ! ! !

Expert QTP
expert.qtp@gmail.com

All Articles are Copyright Protected. These are Free for Reading & Personal Use. Reproduction in Any Form without the Permission is Illegal & Strictly Prohibited.

Copyright © 2009 ExpertQTP

Google Search

Tuesday, October 28, 2008

How to get yourself Registered for HP Quicktest Professional(QTP) for Certification

These days I am getting several emails from the esteemed readers of my blog, who are curious to know the answer to a most sought after question; which goes like:

"Hi Expert !!!! Can you please suggest me how can I register for HP Quicktest Professional (QTP) Certification, what's the exam fee, What's the structure of Certification Exam etc etc."

Hence for the benefit of my curious readers, I am publishing this post which will answer all such queries:

1. The code for the HP QTP certification exam is HPO: M16

2. You need to open this website for more details: http://www.register.prometric.com/Index.asp

3. Here in this website, Select your Country for example United States. Then select a state for example Alaska. Click on the Next button.

4. Select Hewlett Packard from Client as shown in the following screenshot. Click on the Next button.


5. Again click on the Next button on HP Certified Professional Page. You will see the following page.

6. Select HPO-M16 from Exam as shown in the following screenshot. The exam fees may vary according to the location of your country.

7. In the next page, you will see a list of Center locations along with their Contact Numbers which conducts this exam. You guys can contact any of these Centers based on your choice.

8. Once ready for the exam after paying the fee, be prepared to answer a set of 60 Nos. Multiple choice questions, having a Minimum Passing Score of 70%.


9. Time commitment for the QTP Certification exam is 2 Hours.

10. You will get a Scorecard after clearing the QTP certification exam and for getting a Certificate you need to clear the QC exam / HP Quality Center Exam as well.


If you need specialized help in learning QTP leading to HP Certification, Please let me know.

All the Best Friends !!!!!!!!!!!!

Posted By : QTP Expert
expert.qtp@gmail.com

Keywords: HP QuickTest Professional Certification, QTP Certification, HP Certified Professional Exam, Registration for QTP Certification, QTP Training




Read more...


Wednesday, October 15, 2008

QTP - Interview Question Bank : Part 11

Q. 101: What is the process of capturing visible portion of an object in QTP?
=====================================================

QTP captures the visible part of the specified object as a bitmap and inserts a checkpoint in the test. QTP does not capture any part of the screen which happens to be scrolled off the screen. You can check an area of an 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.

==================================================
Q. 102: What is the process of comparing selected area of object with Bitmap stored in the checkpoint?
==================================================

When you run the test, QTP compares the object or selected area of the object in the application with the bitmap stored in the checkpoint.

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.

=================================================
Q. 103: How can we define a time interval for QTP to perform a checkpoint successfully?
=================================================


For defining some time interval (say in seconds) during which QTP shopuld attempt to perform the checkpoint successfully, we need to specify the Checkpoint Timeout. QTP continues to perform the checkpoint until it passes or until the timeout occurs. If the checkpoint does not pass before the timeout occurs, the checkpoint fails.

For example, suppose it takes some time for an object to achieve an expected state. Increasing the checkpoint timeout value in this case can help ensure that the object has sufficient time to achieve that state, enabling the checkpoint to pass (if the data matches) before the maximum timeout is reached.

==============================================
Q. 104: How can we check the object property values in our application?
==============================================


You can check that a specified object in your application has the property values you expect, by adding a standard checkpoint step to your test while recording or editing the test. Standard checkpoints compare the expected values of object properties to the object’s current values during a run session.

We can use standard checkpoints to perform checks on images, tables, Web page properties, and other objects within our application.

=======================================
Q. 105: How can we identify a checkpoint in QTP?=======================================
We identify a checkpoint by its name. By default, the checkpoint name is the same as the name of the test object on which the checkpoint was created. You can specify a different name for the checkpoint or accept the default name.

If you want to rename a checkpoint, make sure that the name is unique, and it does not begin or end with a space, and does not contain the special charactesr like " := @@

===============================================
Q. 106: How can we Insert statement option when adding a checkpoint during the recording?
===============================================


The Insert statement option is not available when adding a checkpoint during recording or when modifying an existing object checkpoint. It is available only when adding a new checkpoint to an existing test while editing it.

=============================================
Q. 107: How can we compare the image files in the Image Checkpoint?
=============================================


We can compare the image files in the Image Checkpoint by using the Compare image content option in the Image Checkpoint Properties dialog box. It compares the expected image source file with the graphic of the actual image source file. If the expected and actual images are different, QTP displays them both in the Test Results. If the images are identical, only one graphic is displayed.

====================================================
Q. 108: How can we check the contents of tables in our application in QTP?
====================================================

We can check the contents of tables in our application by adding table checkpoints to the test. For example, you can check that a specified value is displayed in a particular cell. We can also check the properties of the table object. For example, you can check that a table has the expected number of rows and columns.

When you run the test, the table checkpoint compares the actual data to the expected data, as defined in the checkpoint. If the results match, the checkpoint passes.

====================================================
Q. 109: How do we compare actual cell values with the expected cell values in Tables in QTP?.
====================================================

By using the Settings tab we can compare actual cell values with the expected cell values in tables. Bu using Verification type option we can compare following types of cell contents.

1) String Content: It is the default setting. It treats the cell values as strings and checks for the exact text, while ignoring spaces. For example, 2 and 2.00 are not recognized as the same string.

2) Numeric Content: Evaluates the content of the cell according to numeric values. For example, 2 and 2.00 are recognized as the same number.

3) Numeric Range: Compares the content of the cell against a numeric range, where the minimum and maximum values are any real number that you specify.

=====================================================
Q. 110: How can we check the location of a cell to be checked in a Column of a table?
=====================================================

By the use of Identify columns option available in Cell Identification tab. This specifies the location of the column containing the cells with which you want to compare the expected data. This is done in two ways:

1) By position: This is the Default option. It locates cells according to the column position. A shift in the position of the columns within the table results in a mismatch.

2) By column name: It locates cells according to the column name. A shift in the position of the columns within the table does not result in a mismatch. This option gets enabled only when the table contains more than one column.

Keyword: QTP Interview Questions, FAQ QTP




Read more...


QTP - Interview Question Bank : Part 10

Q. 91: What is a Standard Check Point in QTP?=====================================
It is a checkpoint which checks the property value of an object in your application. 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.

===================================
Q. 92: What is a Image Check Point in QTP?===================================

It is a checkpoint ahich checks the value of an image in your application. For example, you can check that a selected image’s source file is correct. Image checkpoint is created by inserting a standard checkpoint on an image object.

Image checkpoints are supported for the Web add-in environment.

====================================
Q. 93: What is a Bitmap Check Point in QTP?====================================

It is a checkpoint which checks an area of your application as a bitmap. For example, suppose you have a Web site that can display a map of a city the user specifies. The map has control keys for zooming. You can record the new map that is displayed after one click on the control key that zooms in the map. Using the bitmap checkpoint, you can check that the map zooms in correctly.
You can create a bitmap checkpoint for any area in your application, including buttons, text boxes, and tables.

Bitmap checkpoints are supported for all add-in environments

==================================
Q. 94: What is a Table Check Point in QTP?
==================================

It is a checkpoint which checks information within a table. For example, suppose your application contains a table listing all available flights from New Delhi to Chennai. You can add a table checkpoint to check that the time of the first flight in the table is correct.
You create a table checkpoint by inserting a standard checkpoint on a table object.
Table checkpoints are supported for Web, ActiveX, Java, Oracle, and .NET Windows Forms environments, as well as other add-in environments

==================================
Q. 95: What is a Text Check Point in QTP?
==================================

It is a checkpoint which 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 Delhi to Chennai. You can create a text checkpoint that checks that the words “New Delhi” are displayed between “Flight departing from” and “to Chennai”.

Text checkpoints are supported for most add-in environments

=====================================
Q. 96: What is a Text Area Check Point in QTP?=====================================

It is a checkpoint which checks that a text string is displayed within a defined area in a Windows-based 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 all Windows-based environments, such as Standard Windows, Visual Basic, and ActiveX add-in environments

========================================
Q. 97: What is an Accessibility Check Point in QTP?========================================

It is a checkpoint which identifies areas of your Web site that may not conform to the World Wide Web Consortium (W3C) Web Content Accessibility Guidelines. For example, guideline 1.1 of the W3C WebContent Accessibility Guidelines requires you to provide a text equivalent for every non-text element. You can add an Alt property check to check whether objects that require the Alt property under this guideline, do in fact have this tag.

Accessibility checkpoints are supported for the Web add-in environment.

===================================
Q. 98: What is a Page Check Point in QTP?
===================================
It is a 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.

You create a page checkpoint by inserting a standard checkpoint on a page object. Page checkpoints are supported for the Web add-in environment.

=====================================
Q. 99: What is a Database Check Point in QTP?=====================================

It is a checkpoint which checks the contents of a database accessed by your application. For example, you can use a database checkpoint to check the contents of a database containing flight information for your Web site.

Database checkpoints are supported for all add-in environments

===================================
Q. 100: What is a XML Check Point in QTP?===================================

It is a checkpoint which checks the data content of XML documents in XML files or XML documents in Web pages and frames. The XML Checkpoint option is supported for the Web add-in environment & for all add-inenvironments.

Keyword: QTP Interview Questions, FAQ QTP


Read more...


Wednesday, October 8, 2008

QTP - Interview Question Bank : Part 9

Q. 81: What is the use of Keyword View in QTP?=====================================

The Keyword View enables you to create and view the steps of your test in a modular, table format. Each step is a row in the Keyword View that is comprised of individual, modifiable parts. You create and modify steps by selecting items and operations in the Keyword View and entering information as required. Each step is automatically documented as youcomplete it, enabling you to view a description of your test in understandable sentences.

===================================================
Q. 82: What are the Conditional and Loop Statements used in the Keyword View in QTP?
===================================================

Using conditional statements, you can incorporate decision making into the tests. Using loop statements, you can run a group of steps repeatedly, either while or until a condition is true. You can also use loop statements to repeat a group of steps a specific number of times. A few conditional & Loop statements are given below:
1) If...Then statement
2) ElseIf...Then statement
3) Else statement
4) While...Wend statement
5) For...Next statement
6) Do...While statement
7) Do...Until statement

=================================================
Q. 83: What is the use of a Comment in the Comment cell of a step in QTP?
=================================================

A Comment is free text entry which can help improve readability and make a test easier to update. For example,you may want to add a comment step at the beginning of each action to specify what that section includes.

QTP does not process comments when it runs a test.

============================================
Q. 84: What are Nesting Actions & what is the use of them?============================================

Sometimes you may want to call an action from within an action. This is called nesting. By nesting actions, you can:

1) Maintain the modularity of your test.
2) Run one or more actions based on the results of a conditional statement.

=============================================
Q. 85: Splitting Actions option is not available under what circumstances in QTP?=============================================

You cannot split an action, and the option is disabled when:
1) An external action is selected
2) The first step of an action is selected
3) You are working with a read-only test
4) Recording a test
5) Running a test

=========================================
Q. 86: What is the use of Action Parameters in QTP?=========================================

Action parameters enable you to transfer input values from your test to a top-level action, from a parent action to a nested action, or from an action to a sibling action that occurs later in the test.

You can use action parameters in any step in your action including function calls.


===================================================
Q. 87: What are the various types of Exit Action Statements in QTP?===================================================

There are four types of exit action statements you can use:
1) ExitAction: Exits the current action, regardless of its iteration attributes.
2) ExitActionIteration: Exits the current iteration of the action.
3) ExitRun: Exits the test, regardless of its iteration attributes.
4) ExitGlobalIteration: Exits the current global iteration.

=====================================
Q. 88: What is the use of check points in QTP?=====================================

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 application is functioning correctly.

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.

==================================================
Q. 89: What are the situations best suited for using an existing Check Point?==================================================

1) If each page of your application contains your organization’s logo, you can reuse a bitmap checkpoint to verify each occurrence in the application.

2) If your application contains multiple edit boxes, you can reuse a checkpoint to confirm the enabled status of these edit boxes throughout your test.

===================================================
Q. 90: What is the reason that "Add Existing Checkpoint" dialog box is not visible?===================================================

"Add Existing Checkpoint" dialog box option is available only if at least one of the object repositories associated with the current action (including the local object repository) contains at least one checkpoint.

Keyword: QTP Interview Questions, FAQ QTP




Read more...


QTP - Interview Question Bank : Part 8

Q. 71: What are the various types of objects identified by the comparison tool in QTP?
================================================

1) Identical: Objects that appear in both object repository files. There is no difference in their name or in their properties.

2) Matching description, different name: Objects that appear in both object repository files that have different names, but the same description properties and values.

3) Similar description: Objects that appear in both object repository files that have similar, but not identical, description properties and values. One of the objects always has a subset of the properties set of the other object. This implies that it is likely to be a less detailed description of the same object. For example, an object named Button_1 in the second object repository has the same description properties and values as an object named Button_1 in the first object repository, but also has additional properties and values.

Objects that do not have a description, such as Page or Browser objects, are compared by name only. If the same object is contained in both the object repositories but with different names, they will be shown in the object repositories as two separate objects.

4) Unique to first file, or Unique to second file. Objects that appear in only one of the object repository files.

=================================================
Q. 72: What are the situations best suited to Recording in QTP?
=================================================
Recording can be useful in the following situations:

# Recording helps novice QuickTest users learn how QTP interprets the operations you perform on your application, and how it converts them to QTP objects and built-in operations.

# Recording can be useful for more advanced QTP users when working with a new application or major new features of an existing application (for the same reasons described above). Recording is also helpful while developing functions that incorporate built-in QTP keywords.

# Recording can be useful when you need to quickly create a test that tests the basic functionality of an application or feature, but does not require long-term maintenance.

===================================================
Q. 73: What are the advantages of Keyword Driven testing in QTP?
===================================================

1) Keyword-driven testing enables you to design your tests at a business level rather than at the object level.

2) By incorporating technical operations, such as a synchronization statement that waits for client-server communications to finish, into higher level keywords, tests are easier to read and easier for less technical application testers to maintain when the application changes.

3) Keyword-driven testing naturally leads to a more efficient separation between resource maintenance and test maintenance. This enables the automation experts to focus on maintaining objects and functions while application testers focus on maintaining the test structure and design.

4) When you record tests, you may not notice that new objects are being added to the local object repository. This may result in many testers maintaining local object repositories with copies of the same objects. When using a keyword-driven methodology, you select the objects for your steps from the existing object repository. When you need a new object, you can add it to your local object repository temporarily, but you are also aware that you need to add it to the shared object repository for future use.

=========================================
Q. 74: What are Absolute and Relative Paths in QTP?
=========================================

You can save QuickTest resources, such as shared object repositories, function libraries, recovery scenarios or environments, using absolute or relative paths.

1) An absolute path: Describes the full path to a specific file starting from a fixed location such as the root directory, or the drive on which the file is located, and contains all the other sub-directories in the path. An absolute path always points to the specified file, regardless of the current directory.

2) A relative path: Describes the path to a specific file starting from a given directory, and is generally only a portion of the absolute path. A relative path therefore specifies the location of the file relative to the given location in the file system.

Using relative paths means that the paths remain valid when files or folders containing files are moved or copied to other locations or computers, provided that they are moved within the same folder structure. For this reason, we recommend that you use relative paths when saving resources in QTP.

===============================================
Q. 75: What are the situations best suited to keyword-driven methodology in QTP?
===============================================
The keyword-driven methodology is especially useful for organizations that have both technical and less technical users because it offers a clear division of automation tasks. This enables a few experts to maintain the resource framework while less technical users design and maintain automated test steps. Additionally, once the basic infrastructure is in place, both types of users can often do their tasks simultaneously.

===============================================
Q. 76: What are the various categories of output values in QTP?===============================================
we can create following categories of output values:

1) Standard output values
2) Text and text area output values
3) Table output values
4) Database output values
5) XML output values

=================================================
Q. 77: How do you analyze your application to determine your testing needs using QTP?.
=================================================

1) Determine the development environments that QuickTest needs to support:Your application comprises of windows containing a hierarchy of objects that were created in one or more development environments. QTP provides support for these environments using add-ins. You load QTP add-ins when QTP opens by using the Add-in Manager dialog box. You can check which add-ins are loaded by choosing Help > About QuickTest Professional.

2) Prepare the information that QTP needs to identify objects in your application and to open your application at the beginning of a run session. You need to know the URL, the executable file name and path, or other command-line information. Later, you will enter this in Record and Run Settings dialog box.

3) Navigate through your application from a customer’s perspective and perform the tasks that customers might perform. You create an action for each sub-process, or task, a customer might perform. Each process you perform in your application will be represented as a test in QTP. You can create your tests now.

===================================================
Q. 78: In what situations recording mechanism shall be useful in creating the tests in QTP?

===================================================
1) You are new to QTP and want to learn how QTP interprets the operations you perform on your application and how it converts them to QTP objects and built-in operations.

2) You need to quickly create a test that tests the basic functionality of an application or feature, and the test does not require long-term maintenance.

3) You are working with a new application or with major new features of an existing application, and you want to learn how QTP interacts with the application.

4) You are developing functions that incorporate built-in QTP keywords.

==========================================
Q. 79: What are the various recording modes in QTP?==========================================

1) Normal or the default recording mode: This records the objects in your application and the operations performed on them. This mode takes full advantage of the QTP object model, recognizing the objects in your application regardless of their location on the screen.

2) Analog Recording: This enables you to record the exact mouse and keyboard operations you perform in relation to either the screen or the application window. In this recording mode, QTP records and tracks every movement of the mouse as you drag the mouse around a screen or window.

3) Low Level Recording:This enables you to record on any object in your application, whether or not QTP recognizes the specific object or the specific operation. This mode records at the object level and records all run-time objects as Window or WinObject test objects.

===================================================
Q. 80: How can we switch to Low Level Recording mode while editing a test?===================================================

You can switch to Low Level Recording mode only while recording a test. The option is not available while editing a test.

Keyword: QTP Interview Questions, FAQ QTP


Read more...


Tuesday, October 7, 2008

Usage of &_ in QTP Script

We use &_ to separate multiple lines inside our script whom we want to execute as a single command by clubbing together. Lets see the below mentioned example to make the point more clearer.


As you must have observed above, the character “&” is used to concatenate the strings while the character “_” is used to concatenate multiple lines. So on combining these two characters ie “&_” we are instructing QTP to concatenate strings spanning across multiple lines.

We could have wrote the “f.Write…………” in single line but it would have been very hard to read.

A more simple example to illustrate the usage can be:

Browser(“QTP”).Page(“QTP”). WebEdit("TextField").Set “Expert”&_
"loves QTP" &_
"Any Doubts?"

Keywords: QTP


Read more...


 
Copyright © 2009 ExpertQTP