Showing posts with label HP QTP. Show all posts
Showing posts with label HP QTP. Show all posts

Saturday, 20 August 2016

What are the reasons for choosing to automate your project and why did you choose HP UFT/QTP?

This is a frequently asked question to Test Automation Engineer. I tried to jot down my thoughts on it.  I would like to answer this query in two part -

1. Reasons for choosing to automate your project :
First part of this query is here, reason behind automation is plain & simple -
  • Automation saves lots of time while retesting and regression testing.
  • Automation saves manual resource and money.
  • It increases test coverage and Accuracy.
  • Run tests faster than human users.
  • Tests can be re-used on different versions of the software at any time.
  • Less human resources are involved in automation
  • Automate repetitive work & save QA Engineer time for business elusive bugs
  • Ultimately save money
  • write once run anywhere,anytime
  • Saves time and money.
  • we can schedule the scripts and set computer to run it automatically.
  • Its cool and more interesting than manual testing, even it help developers.
2. Reasons for choosing HP UFT/QTP :

  • UFT/QTP support both Web application and window application.
  • It generates the code automatically, you do not have to waste your time writing code and debugging the code like in selenium.
  • Object repository is one of the major features of QTP. Object repository stores the properties of various object or element.
  • QTP supports almost all popular automation frameworks like Linear, Keyword, Data Driven, Hybrid etc. for automation purpose.

The only disadvantage of HP UFT/QTP is that it is not open source. In order to use it, you need to buy license.

Monday, 2 May 2016

Does QTP testing require in depth knowledge of VB script

You need to understand what you are trying to do with QTP. Generally, QTP testers work on three different levels -

1. User - Framework and automation test scripts are created by other people in this scenario. The user only executes the prewritten scripts and analyze the results. You will need little knowledge of vbscript in this case, just to be able to troubleshoot if something goes wrong. You should know following in VB Script - Focus on flow controls, creating methods, basic string operations, date operations, variables type, reading and writing to Excel, and commonly used VB script methods.

2. Script developer - In this case, you will need to prepare test scripts, adhering to the guidelines of the framework in your organization. You will need deeper understanding of VBScript and programming in general to play this role.

3. Framework designer/developer - This is a highly specialized role. You will need in depth knowledge of VBScript and at least another high level language, understanding of design patterns and good grasp of data structures and algorithms to play this role.

Think where you want to be in your career. In case you want to opt for #3, You should start learning VBScript.

You can visit W3Schools Online Web Tutorials and complete online tutorial on VB. 

Tuesday, 7 January 2014

HP QTP : What is a Run-Time Data Table? Where can I find and view this table

Data like parameterized output, checkpoint values, and output values are stored in the Run-time Table. It is an XLS file which is stored in the Test Results Folder.  It can also be viewed in the Test Report. Click on View -> Data Table to display data table.

QTP : How will you check a web application for broken links

You can use the Page Checkpoint which gives a count of valid/invalid links on a page.

HP QTP : What is the difference between functions and actions in QTP

               QTP Action
  • Action is a QTP concept and it can use QTP features like own Object Repository, Data Table, checkpoints etc.
  • Actions help make your Test modular and increase reuse. Example: You can divide your script into Actions based on functionality like Login, Logout etc.
  • It is slow in execution.
  • Functions is a VB Script programming concept and do not have their own Object Repository or Data Table. Functions help in re-use of your code. Ex:  You can create a Function in your script to concatenate two strings.
  • We can’t use checkpoints in functions, instead of checkpoints we can use validation points (Loops and Conditional statements)
  • Functions are faster in execution than Actions

Friday, 3 January 2014

What is the Difference between Bitmap Check point & Image Check point

Bitmap checkpoint does a pixel to pixel comparison of an image or part of an image.

Image Checkpoint checks the value of an image in your application like alt text, destination URL. Note: You create an image checkpoint by inserting a standard checkpoint on an image object. It is supported only in web environment.

Thursday, 2 January 2014

QTP / UFT : How to for broken links on a web application

You can use the Page Checkpoint which gives a count of valid/invalid links on a page.

What is Text output & its use in QTP

A Text Output values enables to capture or to output text strings displayed in an AUT during run time. For example, suppose that you want to store the text of any error message that appears after a specific step in the Web application you are testing. You can create a text output value while recording or editing your test.

To create a text output value while recording:
1.   Highlight or display the text string you want to use for an output value.
2.  Select Insert > Output Value > Text OutputValue. The pointer changes into a pointing hand.
3.  In your application, click the text string for which you want to specify a text output value. The Text Output Value Properties dialog box opens.

4.  QTP creates a column (using logical name of object) in Global DataTable to store output value.

Saturday, 28 December 2013

What is the difference between check point and output value

                      Output Value
·        A checkpoint is a verification point that compares a current value for a specified property with the expected value for that property.
·        When the test is run, HP QTP compares the expected results of the checkpoint to the current results.
·        If the results do not match, the checkpoint fails & results of the checkpoint can be viewed in the Test Results window.
·        When Checkpoint is added, HP QTP adds a checkpoint with an icon in the test tree and adds a Checkpoint statement in the Expert View.
·        Checkpoint syntax - Window("Flight Reservation").WinComboBox("Fly To:").Check CheckPoint("Fly To:")
·        Insert -> Checkpoint -> Select the type of Checkpoint OR Right click the object in the Active Screen and select the type of checkpoint to be added.

·        An Output Value is used to retrieve the current value of any object in the application and stores it in a specified location. It can output values from text strings, table cells, databases, and XML documents. Unlike Checkpoints, no PASS/FAIL status is generated.
·        An output value is a value captured during the test run and entered in the run-time Data Table for use at another point in the test run.
·        When you create an output value, the test retrieves a value at a specified point during the test run and stores it in a column in the current row of the run-time Data Table.
·        When the value is needed later in the test run as input, HP QTP retrieves it from the Data Table.
·        You can output the property values of any objects.
·        Insert -> Output Value->Select the type of output value OR Right click the object in the Active screen and select the type of output value to be added.

Monday, 23 December 2013

What is HP QTP Test Batch Testing tool

HP Quick Test Professional Test Batch Runner runs several tests in succession. Once the scripts are added in the tool, it will automatically open the scripts and start executing them one after the other.
·        To enable Test Batch Runner to run tests, you must select [Allow other HP products to run tests and components] in the Run pane of the Options dialog box.
·        Test Batch Runner can be used only with tests located in the file system. If you want to include tests saved in Quality Center in the batch run, you must first save the tests in the file system.
·        You can stop a test batch run at any time by clicking the Stop button.

To set up and run a test batch:
1.      From the Start menu, select Programs > Quick Test Professional > Tools > Test Batch Runner. The Test Batch Runner dialog box opens.
2.      Click the Add button or select Batch > Add. The Open Test dialog box opens.
3.      Select a test you want to include in the test batch list and click Open. The test is added to the list.
4.      If you want to save the batch list, click the Save button, or select File > Save, and enter a name for the list. The file extension is .mtb.
5.      When you are ready to run your test batch, click the Run button or select Batch > Run.

Friday, 29 November 2013

What is Virtual Object

 Application Under Test (AUT) 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 can 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. 

How will you call from one action to another action

HP QTP allows calling an action in 2 ways
1.  Call to copy of Action - The original action is copied in its entirety, including checkpoints, parameterization, the corresponding action tab in the Data Table, any defined action parameters, local object repository. The action is inserted into the test as an independent, non-reusable action (even if the original action was reusable). After the action is copied into your test, you can add to, delete from, or modify the action just as you would with any other non-reusable action. Any changes you make to this action after you insert it affect only this action, and changes you make to the original action do not affect the copied action. To view, Right-click & select Action > Insert Call to Copy.

2.    Call to Existing an Action - In this approach, a link is created to called Action. User can view the steps of the action in the action view, but you cannot modify them. The called action’s local object repository (if it has one) is also read-only. If the called external action has data in the Data Table, however, you can choose whether you want the data from the action’s data sheet to be imported as a local, editable copy, or whether you want to use the (read- only) data from the original action. (Columns and data from the called action’s global data sheet are always imported into the calling test as a local, editable copy.) To modify a called, external action, you must open the test with which the action is stored and make your modifications there. The modifications apply to all tests that call that action. If you chose to use the original action’s data when you call an external action, then changes to the original action’s data are applied as well. To view, Right-click & select Action > Insert Call to Existing Action.

Sunday, 24 November 2013

How does QTP identifies object

 HP QTP identifies any GUI Object based on its corresponding properties.  While recording, QTP identifies and store peculiar properties (as defined in the Object Identification settings) in the object repository of the GUI object. At run-time, QTP will compare the stored property values with the on-screen properties, to uniquely identify the GUI object.