Thursday, March 7, 2013

Interview Questions in QTP

Qn. This Quick Test feature allows you select the appropriate add-ins to load with your test.
Add-in Manager
Qn. Name the six columns of the Keyword view.
Item, Operation, Value, Documentation, Assignment, Comment
Qn. List the steps to change the logical name of an object named “Three Panel” into “Status Bar” in the Object Repository.
Select Tools>Object Repository. In the Action1 object repository list of objects, select an object, right click and select Rename from the pop-up menu.
Qn. Name the two run modes available in Quick Test Professional.
Normal and Fast
Qn. When Quick Test Professional is connected to Quality Center, all automated assets (e.g. tests, values) are stored in Quality Center.
True
Qn. What information do you need when you select the Record and Run Setting – Record and run on these applications (opened when a session begins)?
Application details (name, location, any program arguments)
Qn.  Name and discuss the three elements that make up a recorded step.
Item – the object recorded, Operation – the action performed on the object, Value – the value selected, typed or set for the recorded object.
Qn. There are two locations to store run results. What are these two locations and discuss each.
New run results folder – permanently stores a copy of the run results in a separate location under the automated test folder.
Temporary run results folder – Run results can be overwritten every time the test is played back.
Qn. True or False: The object class Quick Test uses to identify an object is a property of the object.
False
Qn. True or False: You can modify the list of pre-selected properties that Quick Test uses to identify an object.
True
Qn. True or False: A synchronization step instructs Quick Test to wait for a state of a property of an object before proceeding to the next recorded step. Synchronization steps are activated only during recording.
True
Qn. Manually verifying that an order number was generated by an application and displayed on the GUI is automated in Quick Test using what feature?
a Checkpoint
Qn. True or False: Quick Test can automate verification which is not visible on the application under test interface.
True
Qn. What is Checkpoint Timeout Value?
A checkpoint timeout value specifies the time interval (in seconds) during which Quick Test attempts to perform the checkpoint successfully. Quick Test 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.
Qn.True or False: You can modify the name of a checkpoint for better readability.
Ans: False
Qn.  Write the letter of the type of parameter that best corresponds to the requirement:
a. An order number has to be retrieved from the window and saved into a file for each test run.
b. A value between 12 and 22 is entered in no particular order for every test run.
c. Every iteration of a test should select a new city from a list item.
A. Environment Parameter
B. Input Parameter
C. Component Parameter
D. Output Parameter
E. Random Parameter
D, E, B
Qn.  This is the Data Table that contains values retrieved from the application under test. You can view the captured values after the test run, from the Test Results. What do you call this data table?.
Run-Time Data Table
Qn. Name and describe each of the four types of trigger events.
Ans:A pop up window appears in an opened application during the test run.
A property of an object changes its state or value.
A step in the test does not run successfully.
An open application fails during the test run.
Qn. Explain initial and end conditions.
Ans: Initial and end conditions refer to starting and end points of a test that allows the test to iterate from the same location, and with the same set up every time (e.g. all fields are blank, the test starts at the main menu page).
Qn. What record and run setting did you select so that the test iterates starting at the home page?
Ans: Record and run test on any open Web browser.
Qn. What Quick Test features did you use to automate step 4 in the test case? What property did you select?
Ans: Standard checkpoint on the list item Number of Tickets
Properties: items count, inner text, all items
Qn. Select Tools> Object Repository. In the Action1 object repository list of objects, select an object, right click and select Rename from the pop-up menu.
Ans: Input Parameter
Qn. What planning considerations did you have to perform in order to meet the above listed requirements?.
Ans:Register at least three new users prior to creating the automated test in order to have seed data in the database.
Qn. What Quick Test feature did you use to meet the requirement:
“The test should iterate at least three times using different user names and passwords”
Ans: Random parameter, range 1 to 4
Qn. Discuss how you automated the requirement:“Each name used during sign-in should the be first name used when booking the ticket at the Book a Flight page.”
Ans: The username is already an input parameter. Parameterize the step ‘passFirst0’ under BookAFlight and use the parameter for username.
Qn. Challenge: What Quick Test feature did you use to meet the requirement:
“All passwords should be encrypted”
Ans: Challenge: From the Data table, select the cell and perform a right mouse click. A pop up window appears. Select Data > Encrypt
Qn.  Keyword view in QTP is also termed as
Icon based view
Qn. What is the use of data table in QTP?
parameterizing the test
Qn. What is the use of working with actions?
To design a modular and efficient tests
Qn. What is the file extension of the code file and object repository file in QTP?
The extension for code file is .vbs and the extension for object repository is .tsr
Qn. What are the properties we can use for identifying a browser and page when using descriptive programming?
The name property is used to identify the browser and the title property is used to identify the page
Qn. What are the different scripting languages we can use when working with QTP?
VB script
Qn. Give the example where we can use a COM interface in our QTP project?
COM interface appears in the scenario of front end and back end.
Qn. Explain the keyword createobject with example
createobject is used to create and return a reference to an automation object.
For example:
Dim ExcelSheetSet
ExcelSheet=createobject(“Excel.Sheet”)
Qn. How to open excel sheet using QTP script?
You can open excel in QTP by using the following command
System.Util.Run”Path of the file”
Qn. Is it necessary to learn VB script to work with QTP?
Its not mandate that one should mastered in VB script to work with QTP. It is mostly user friendly and for good results we need to have basic VB or concepts which will suffice
Qn. If WinRunner and QTP both are functional testing tools from the same company. Why a separate tool       QTP came in to picture?
QTP has some additional functionality which is not present in WinRunner. For example,you can test(Functionality and Regression testing) an application developed in .Net technology with QTP,which is not possible to test in WinRunner.
Qn. Explain in brief about the QTP automation object model
The test object model is a large set of object types or classes that QTP uses to represent the objects in our application. Each test object has a list of properties that can uniquely identify objects of that class.
Qn. What is a Run-Time data table?
The test results tree also includes the table-shaped icon that displays the run-time data table-a table that shows the values used to run a test containing data table parameters or the data table output values retrieved from a application under test.
Qn. What are all the components of QTP test script?
QTP test script is a combination of VB script statements and statements that use QuickTest test objects ,methods and properties
Qn. What is test object?
Its an object that QTP uses to represent an object in our application. Each test object has one or more methods and properties that we can use to perform operations and retrieve values for that object. Each object also has a number of identification properties that can describe the object.
Qn. What are all the rules and guidelines want to be followed while working in expert view?
 Case-sensitivity
VB script is not case sensitive and does not differentiate between upper case and lower case spelling of words.
Text strings
When we enter value as a string, that time we must add quotation marks before and after the string
Variables
We can use variables to store strings,integers,arrays and objects. Using variables helps to make our script more readable and flexible.
Parentheses
To achieve the desired result and to avoid the errors,it is important that we use parentheses() correctly in our statements.
Comments
We can add comments to our statements using apostrophe(’),either at a beginning of the separate line or at the end of a statement
Spaces
We can add extra blank spaces to our script to improve clarity. These spaces are ignored by the VB script
Qn. 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.
Qn. 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.
Qn. 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.
Qn. 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.
Qn. 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.
Qn.  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.
Qn. 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.
Qn, 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. 
Qn. 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.
Qn. 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.
Qn. 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.
Qn.  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. 
Qn.  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
Qn. 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.
Qn. 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.
Qn.  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.
Qn. 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.
Qn. 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
Qn.  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.
Qn. 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.
Qn. 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. 
Qn. 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 
Qn. 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. 
Qn. What are the Features & Benefits of Quick Test Pro(QTP)..?
1. Key word driven testing
2. Suitable for both client server and web based application
3. Vb script as the script language
4. Better error handling mechanism
5. Excellent data driven testing features
3. How to handle the exceptions using recovery secnario manager in Qtp?
You can instruct QTP to recover unexpected events or errors that occured in your testing environment during test run. Recovery scenario manager provides a wizard that guides you through the defining recovery scenario. Recovery scenario has three steps
1. Triggered Events
2. Recovery steps
3. Post Recovery Test-Run
Qn. What is the use of Text output value in Qtp?
Output values enable to view the values that the application talkes during run time.When paramaterised, the values change for each iteration.Thus by creating output values, we can capture the values that the application takes for each run and output them to the data table.
Qn. How to use the Object spy?
There are two ways to Spy the objects in QTP
1) Thru file toolbar
---In the File ToolBar click on the last toolbar button (an icon showing a person with hat).
2) Tru Object repository Dialog
---In Objectrepository dialog click on the button"object spy..."
In the Object spy Dialog click on the button showing hand symbol.
the pointer now changes in to a hand symbol and we have to point out the object to spy the state of the object
if at all the object is not visible..or window is minimised then Hold the Ctrl button and activate the required window to and release the Ctrl button.
Qn. What is the file extension of the code file & object repository file in QTP?
File extension of
-- Per test object rep :- filename.mtr
-- Shared Oject rep :- filename.tsr
Code file extension id script.mts
Qn. Explain the concept of object repository & how QTP recognises objects?
Object Repository: displays a tree of all objects in the current component or in the current action or entire test( depending on the object repository mode you selected).
we can view or modify the test object description of any test object in the repository or to add new objects to the repository.
Quicktest learns the default property values and determines in which test object class it fits.If it is not enough it adds assistive properties, one by one to the description until it has compiled the unique description.If no assistive properties are available, then it adds a special Ordianl identifier such as objects location onthe page or in the source code.
Qn. What are the properties you would use for identifying a browser & page when using descriptive programming ?
"name" would be another property apart from "title" that we can use.
OR
We can also use the property "micClass".
ex: Browser("micClass:=browser").page("micClass:=page")....
Qn. What are the different scripting languages you could use when working with QTP ?
Visual Basic (VB),XML,JavaScript,Java,HTML
Qn. Few basic questions on commonly used Excel VBA functions in QTP.
common functions are:
Coloring the cell
Auto fit cell
setting navigation from link in one cell to other
saving
Qn. Explain the keyword createobject in QTP with an example.
Creates and returns a reference to an Automation object
syntax: CreateObject(servername.typename [, location])
Arguments
servername:Required. The name of the application providing the object.
typename : Required. The type or class of the object to create.
location : Optional. The name of the network server where the object is to be created.
Qn. Explain in brief about the QTP Automation Object Model?
Essentially all configuration and run functionality provided via the QuickTest interface is in some way represented in the QuickTest automation object model via objects, methods, and properties. Although a one-on-one comparison cannot always be made, most dialog boxes in QuickTest have a corresponding automation object, most options in dialog boxes can be set and/or retrieved using the corresponding object property, and most menu commands and other operations have corresponding automation methods. You can use the objects, methods, and properties exposed by the QuickTest automation object model, along with standard programming elements such as loops and conditional statements to design your program.
Qn. How to handle dynamic objects in QTP?
QTP has a unique feature called Smart Object Identification/recognition. QTP generally identifies an object by matching its test object and run time object properties. QTP may fail to recognise the dynamic objects whose properties change during run time. Hence it has an option of enabling Smart Identification, wherein it can identify the objects even if their properties changes during run time.
Check this out-
If QuickTest is unable to find any object that matches the recorded object description, or if it finds more than one object that fits the description, then QuickTest ignores the recorded description, and uses the Smart Identification mechanism to try to identify the object.
While the Smart Identification mechanism is more complex, it is more flexible, and thus, if configured logically, a Smart Identification definition can probably help QuickTest identify an object, if it is present, even when the recorded description fails. 
The Smart Identification mechanism uses two types of properties:
Base filter properties—The most fundamental properties of a particular test object class; those whose values cannot be changed without changing the essence of the original object. For example, if a Web link's tag was changed from to any other value, you could no longer call it the same object.
Optional filter properties—Other properties that can help identify objects of a particular class as they are unlikely to change on a regular basis, but which can be ignored if they are no longer applicable.
Qn. What is a Run-Time Data Table? Where can I find and view this table?
In QTP, there is data table used , which is used at runtime.
-In QTP, select the option View->Data tabke.
-This is basically an excel file, which is stored in the folder of the test created, its name is Default.xls by default.
Qn. How does Parametrization and Data-Driving relate to each other in QTP?
To datadrive we have to parametrize.i.e. we have to make the constant value as parameter, so that in each iteration(cycle) it takes a value that is supplied in run-time datatable. Through parametrization only we can drive a transaction(action) with different sets of data. You know running the script with the same set of data several times is not suggestable, & it's also of no use.
Qn. What is the difference between Call to Action and Copy Action.?
Call to Action : The changes made in Call to Action , will be reflected in the orginal action( from where the script is called).But where as in Copy Action , the changes made in the script ,will not effect the original script(Action)
Qn. Discuss QTP Environment.
QuickTest Pro environment using the graphical interface and ActiveScreen technologies - A testing process for creating test scripts, relating manual test requirements to automated verification features - Data driving to use several sets of data using one test script.
Qn. Explain the concept of how QTP identifies object.
During recording qtp looks at the object and stores it as test object.For each test object QT learns a set of default properties called mandatory properties,and look at the rest of the objects to check whether this properties are enough to uniquely identify the object. During test run,QT searches for the run time obkects that matches with the test object it learned while recording.
Qn. Differentiate the two Object Repository Types of QTP.
Object repository is used to store all the objects in the application being tested.2 types of object repositoy per action and shared. In shared repository only one centralized repository for all the tests. where as in per action.for each test a separate per action repository is created.
Qn. What the differences are and best practical application of each?
Per Action Repository: For Each Action, one Object Repository is created.
Shared Repository: One Object Repository is used by entire application
Qn. Explain what the difference between Shared Repository and Per_Action Repository
Shared Repository: Entire application uses one Object Repository , that similar to Global GUI Map file in WinRunner
Per Action Repository: For each Action ,one Object Repository is created, like GUI map file per test in WinRunner
Qn. Have you ever written a compiled module? If yes tell me about some of the functions that you wrote. If yes tell me about some of the functions that you wrote.
Dynamic data during runtime. Function used for Capturing Desktop, browser and pages.
Qn. What projects have you used WinRunner on? Tell me about some of the challenges that arose and how you handled them?
pbs :WR fails to identify the object in gui. If there is a non std window obk wr cannot recognize it ,we use GUI SPY for that to handle such situation.
Qn. Can you do more than just capture and playback?
I have done Dynamically capturing the objects during runtime in which no recording, no playback and no use of repository is done AT ALL.
-It was done by the windows scripting using the DOM(Document Object Model) of the windows.
Qn. How to do the scripting. Is there any inbuilt functions in QTP as in QTP-S. Whatz the difference between them? how to handle script issues?
Yes, there's an in-built functionality called "Step Generator" in Insert->Step->Step Generator -F7, which will generate the scripts as u enter the appropriate steps.
Qn. What is the difference between check point and output value in QTP?
I would like to add some stuff to Aparna's comments.
It is as follows:-
An outPut value is a value captured during the test run and entered in the run-time but to a specified location.
EX:-Location in Data Table[Global sheet / local sheet]
Qn. IF we use batch testing in QTP,the result shown for last action only. In that how can i get result for every action?
u can click on the icon in the tree view to view the result of every action
Qn. How the exception handling can be done using QTP?
It can be done Using the Recovery Scenario Manager which provides a wizard that gudies you through the process of defining a recovery scenario. FYI.. The wizard could be accesed in QTP> Tools-> Recovery Scenario Manager .......
Qn. How many types of Actions are there in QTP?
There are three kinds of actions:
non-reusable action—an action that can be called only in the test with which it is stored, and can be called only once.
reusable action—an action that can be called multiple times by the test with which it is stored (the local test) as well as by other tests.
external action—a reusable action stored with another test. External actions are read-only in the calling test, but you can choose to use a local, editable copy of the Data Table information for the external action.
Qn. How do you data drive an external spreadsheet?
u can use the foll. statements in QTP:
DataTable.ImportSheet "..\..\TestData\Input.xls",1,dtGlobalSheet
DataTable.ExportSheet "..\..\Results\Output.xls","Global"
for importing a file:
DataTable.Import "filename.txt"
(you have to write the path name also for eg:
DataTable.Import "C:\Documents and
Settings\mercury\Desktop\fly.txt")
for Exporting a file:
Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile = fso.CreateTextFile("fileName.txt",True)
(Eg:Set MyFile = fso.CreateTextFile("C:\Documents and Settings\mercury\Desktop\flight.txt",True)
MyFile.WriteLine("Fly_From"&" "&"Fly_To"&" "&"Order_No"&" "&" Flight" )
C1=DataTable.Value(1,1)&" "
C2=DataTable.Value(2,1)&" "
C3=DataTable.Value(3,1)&" "
c4=DataTable.Value(4,1)
B=C1&C2&C3&c4
MyFile.WriteLine(B)
This is just an example
Note: To get the contents in diff column in Exel sheet give tab.
Qn. I want to open a Notepad window without recording a test and I do not want to use SystemUtil.Run command as well How do I do this?
U can still make the notepad open without using the record or System utility script, just by mentioning the path of the notepad "( i.e., where the notepad.exe is stored in the system) in the "Windows Applications Tab" of the "Record and Run Settings window.

Wednesday, March 6, 2013

SAP TAO 3.0 Features and Enhancements

SAP Test Acceleration and Optimization supports SAP customers in accelerating the creation of automated test cases for SAP solutions.
This acceleration is achieved by automatically creating test components for selected SAP transactions.
These test components will then be automatically uploaded into the SAP Quality Center by HP application. These draft test cases are for single transactions, which can then be consolidated into a scenario test case.
SAP Test Acceleration and Optimization also supports maintenance of components and test cases by integration into SAP Solution Manager’s Business Process Change Analyzer.

SAP Testing Acceleration and Optimization:
SAP TAO reduces testing efforts and helps to assemble test cases in a simple drag and drop activity. 
SAP TAO has a different component for every single activity used during testing, such as “Click on Save Button” or “Launch and Log In”. Each component has its own code that refers to a Function Library and calls the proper function to be executed and handle the application under test with the provided parameters for the execution. Also SAP TAO has connectivity with HP Testing Tools such as HP Quick Test Professional, HP Quality Center or HP Application Lifecycle Management (HP ALM).

What can be tested using SAP TAO 3.0?
The Runtime Library delivered with SAP TAO 3.0 supports two different UI Technologies: 
SAP GUI
SAP CRM Web UI 

Features and Enhancements:
PFA (Design)

The PFA (Process Flow Analyzer) is one of the main features of SAP Test Acceleration and Optimization. It records a business scenario by collecting all events thrown by the SAP GUI application and then generates the corresponding test in SAP Quality Center by HP.
The resulting test is built by aggregating the Default Components. Some components correspond to global actions (launch an application, for example), some to the recorded user interaction.
The enhancements in the current version of SAP TAO 3.0 allow you to work in SAP NetWeaver web interfaces.

Object Spy (Design)

The Object Spy is a tool that provides detailed information about the UI elements displayed by the application being tested.
This tool is typically used to retrieve the information identifying the UI elements. Starting with SAP TAO 3.0 the Object Spy supports two different application types:
SAP Applications – based on the SAP GUI Technology
CRM Applications – web pages generated by the WebCUIF Framework
Components
SAP TAO 3.0 now integrates useful SAP Web components which save time and effort during the script building process.