Thursday, May 21, 2009

Basics of QTP

What’s the basic concept of QTP?
QTP is based on two concept-* Recording* Playback


Which scripting language used by QTP?
QTP using VB scripting.

How many types of recording facility are available in QTP? QTP provides three types of recording methods-* Context Recording (Normal)* Analog Recording* Low Level Recording

How many types of Parameters are available in QTP?
QTP provides three types of Parameter-* Method Argument* Data Driven* Dynamic

What’s the QTP testing process?
QTP testing process consist of seven steps-* Preparing to recoding* Recording* Enhancing your script* Debugging* Run* Analyze* Report Defects (more…)

How to Start recording using QTP?
Choose Test > Record or click the Record button.When the Record and Run Settings dialog box opens to do this;1. In the Web tab, select Open the following browser when a record or run session begins.2. In the Windows Applications tab, confirm that Record and run on these applications (opened on session start) is selected, and that there are no applications listed.

How to insert a check point to a image to check enable property in QTP?

  • As you are saying that the all images are as push button than you can check the property enabled or disabled. If you are not able to find that property than go to object repository for that objecct and click on add remove to add the available properties to that object. Let me know if that works. And if you take it as image than you need to check visible or invisible property tht also might help you are there are no enable or disable properties for the image object.
  • The Image Checkpoint does not have any property to verify the enable/disable property.One thing you need to check is:* Find out form the Developer if he is showing different images for activating/deactiving i.e greyed out image. That is the only way a developer can show deactivate/activate if he is using an “image”. Else he might be using a button having a headsup with an image.* If it is a button used to display with the headsup as an image you woudl need to use the object Properties as a checkpoint.

How to Save your test using QTP?
Select File > Save or click the Save button. The Save dialog box opens to the Tests folder.Create a folder which you want to save to, select it, and click Open.Type your test name in the File name field.Confirm that Save Active Screen files is selected.Click Save. Your test name is displayed in the title bar of the main QuickTest window.


How to Run a Test using QTP?
1 Start QuickTest and open your test.
If QuickTest is not already open, choose Start > Programs > QuickTest Professional > QuickTest Professional..
If the Welcome window opens, click Open Existing.
If QuickTest opens without displaying the Welcome window, choose File > Open
or
click the Open button. In the Open Test dialog box, locate and select your test, then click Open.
2 Confirm that all images are saved to the test results.QuickTest allows you to determine when to save images to the test results. Choose Tools > Options and select the Run tab. In the Save step screen capture to test results option, select Always.
Click OK to close the Options dialog box.
3 Start running your test.
Click Run or choose Test > Run. The Run dialog box opens.Select New run results folder. Accept the default results folder name.Click OK to close the Run dialog box.


How to open a new test using QTP?
1. If QuickTest is not currently open, choose Start > Programs > QuickTest Professional > QuickTest Professional. If the Welcome window opens, click Blank Test. Otherwise, choose File > New, or click the New button. A blank test opens.
2. . If QuickTest is already open, check which add-ins are loaded by selecting Help > About QuickTest Professional. If the Web Add-in is not loaded, you must exit and restart QuickTest. When the Add-in Manager opens, select the Web Add-in, and clear all other add-ins. Choose File > New, or click the New button. A blank test opens.


How to do Laod testing for web based Application?
1. Recording a scenerio in QTP of my web based application.2. Make 100 copies of that scenerio and run the test (scenerio run for 100 times)3. In that case, do the load of application on server.4. The basic logic of running the copy 100 times is to create same scenerio as if 100 users were working.


What is the extension of script and object repository files?
Object Repository : .tsr , Script : .mts, Excel : Default.xls


How to supress warnings from the “Test results page”?
From the Test results Viewer “Tools > Filters > Warnings”…must be “Unchecked”.

When we try to use test run option “Run from Step”, the browser is not launching automatically why?
This is default behaviour.

How Does Run time data (Parameterization) is handled in QTP?
You can then enter test data into the Data Table, an integrated spreadsheet with the full functionality of Excel, to manipulate data sets and create multiple test iterations, without programming, to expand test case coverage. Data can be typed in or imported from databases, spreadsheets, or text files.


What is keyword view and Expert view in QTP?
Quick Test’s Keyword Driven approach, test automation experts have full access to the underlying test and object properties, via an integrated scripting and debugging environment that is round-trip synchronized with the Keyword View. Advanced testers can view and edit their tests in the Expert View, which reveals the underlying industry-standard VBScript that QuickTest Professional automatically generates. Any changes made in the Expert View are automatically synchronized with the Keyword View.


How QTP recognizes Objects in AUT?

QuickTest stores the definitions for application objects in a file called the Object Repository. As you record your test, QuickTest will add an entry for each item you interact with. Each Object Repository entry will be identified by a logical name (determined automatically by QuickTest), and will contain a set of properties (type, name, etc) that uniquely identify each object. Each line in the QuickTest script will contain a reference to the object that you interacted with, a call to the appropriate method (set, click, check) and any parameters for that method (such as the value for a call to the set method). The references to objects in the script will all be identified by the logical name, rather than any physical, descriptive properties.


What are the types of Object Repositories in QTP?
QuickTest has two types of object repositories for storing object information: shared object repositories and action object repositories. You can choose which type of object repository you want to use as the default type for new tests, and you can change the default as necessary for each new test. The object repository per-action mode is the default setting. In this mode, QuickTest automatically creates an object repository file for each action in your test so that you can create and run tests without creating, choosing, or modifying object repository files. However, if you do modify values in an action object repository, your changes do not have any effect on other actions. Therefore, if the same test object exists in more than one action and you modify an object’s property values in one action, you may need to make the same change in every action (and any test) containing the object. If I give some thousand tests to execute in 2 days what do u do? Adhoc testing is done. It covers the least basic functionalities to verify that the system is working fine.


How to “Turn Off” QTP results after running a Script?
Goto “Tools > Options > Run Tab” and Deselect “View results when run session ends”. But this suppresses only the result window, but a og will be created and can viewed manually which cannot be restricted from getting created.


Explain about the Test Fusion Report of QTP?
Once a tester has run a test, a TestFusion report displays all aspects of the test run: a high-level results overview, an expandable Tree View of the test specifying exactly where application failures occurred, the test data used, application screen shots for every step that highlight any discrepancies, and detailed explanations of each checkpoint pass and failure. By combining TestFusion reports with QuickTest Professional, you can share reports across an entire QA and development team.


To which environments does QTP supports ?
QuickTest Professional supports functional testing of all enterprise environments, including Windows, Web, ..NET, Java/J2EE, SAP, Siebel, Oracle, PeopleSoft, Visual Basic, ActiveX, mainframe terminal emulators, and Web services.


What’s QuickTest Window?
Before you begin creating tests, you should familiarize yourself with the main QuickTest window.The QuickTest window contains the following key elements:

  • Title bar—Displays the name of the currently open test.
  • Menu bar—Displays menus of QuickTest commands.
  • File toolbar—Contains buttons to assist you in managing your test.
  • Testing toolbar—Contains buttons to assist you in the testing process.
  • Debug toolbar—Contains buttons to assist you in debugging tests.
  • Test pane—Contains the Keyword View and Expert View tabs.
  • Active Screen—Provides a snapshot of your application as it appeared when you performed a certain step during the recording session.
  • Data Table—Assists you to parameterize your test.
  • Debug Viewer pane—Assists you in debugging your test. The Debug Viewer pane contains the Watch Expressions, Variables, and Command tabs. (The Debug Viewer pane is not displayed when you open QuickTest for the first time. You can display the Debug Viewer by choosing View <>
  • Status bar—Displays the status of the QuickTest application.

How does QTP identifies the object in the application?QTP identifies the object in the application by Logical Name and Class.
For example :The Edit box is identified by

Logical Name : txtSearch

Class: WebEdit

If an application name is changes frequently i.e while recording it has name “Window1” and then while running its “Windows2” in this case how does QTP handles?
QTP handles those situations using “Regular Expressions".

2 comments:

Anonymous said...

Nice post and this fill someone in on helped me alot in my college assignement. Gratefulness you seeking your information.

Anonymous said...

nice post
http://soft-engineering.blogspot.com