Basic QTP Interview Questions

Basic QTP Interview Questions

Postby mona1245 » Fri Mar 21, 2014 12:10 am

1) What are the Technologies supported by UFT:
Web, Java (Core and Advanced), .Net, WPF, SAP, Oracle, Siebel, PeopleSoft, Delphi, Power Builder, Stingray 1, Terminal Emulator, Flex, Web Services, Windows Mobile, VisualAge Smalltalk, Silverlight and mainframe terminal emulator

2) Does UFT run in any environment?
No, UFT works only in the windows environment.

3) Explain the views in the UFT GUI?
Keyword view: This view is a tabular representation of all the objects and the actions that are performed on them. Every row in the table is a step performed on the AUT and can be modified. Some of the most common columns displayed are: item, operation, value and documentation.
Editor view: As the name indicates, this view is for more technical users who would want to tweak the source code as per their requirements.

4) What is UFT’s model for test creation?

a) Determine testing needs – Define testing environment, Analyze your application and plan actions
b) Set up repositories – Local or Shared OR
c) Define function libraries
d) Generate test steps – Add steps, Add checkpoints
e) Data drive your tests
f) Run the tests

5) What are the different ways to invoke an application using UFT?
a) SystemUtil.Run
SystemUtil.Run ( FileName, Parameters, Path, Operation )
Example: SystemUtil.Run “iexplorer.exe”,http://www.google.com

InvokeApplication
Example: InvokeApplication “C:\Program Files\Internet Explorer\IEXPLORE.EXE
http://www.google.com”

7) What are the different recording modes ?
UFT provides 3 modes of recording:

Normal Recording mode – The default recording method is always the normal mode. This method uses the model of Test Objects and Runtime objects to learn and act on the AUT.
Analog recording mode – records the exact mouse and key strokes that the user performs in relation to either the screen or AUT window. One scenario in which this type of recording can be used is when we are trying to capture a signature.
Low Level recording mode – This mode records the co-ordinates in the application where the operation is performed, irrespective of whether UFT recognizes the specific Object or Operation.

8) Which recording modes need more memory?
Analog and Low-level recording modes

9) Is it possible to switch between recording modes during a test creation?
Yes, in the middle of recording, we can switch to Analog/Low-level mode, finish the task required and go back to normal recording. The switch to Analog mode is available only during recording and not during editing

10) Does Low level recording capture mouse movements?
No. Mouse movements are not captured.


11) What is Object Spy?
Object Spy is an extremely helpful tool that UFT has to view the properties and operations of an object in the AUT. It shows all the properties of the object and the corresponding values. It also shows the object hierarchy. It also has a provision that lets the users add a certain object to the OR.

12) What is an object repository?
OR is like a warehouse where all the objects in a test are stored. OR has the list of Objects that UFT learned during the record process and the class to which they belong. It stores the set of properties that uniquely identifies the Object (description) and also names the object for the sake of identification in our test, based on its most prominent feature.

13) What are the two types of repositories available, explain them?
Local and shared repository – these are the two kinds of available repositories.
Every action by default has a local repository of its own and has all the objects that are used within it.
Alternately, the tester can have a common repository for multiple actions so that all of them can share the objects that it contains. The common repository is called a shared OR.

14) An action has both shared and local OR associated to it and both have the same object in them. In the test which one will be considered?
If a local OR and Shared OR have an object with the same name, the action will consider the object in its local OR.

15) Can an action have 2 shared object repositories associated with them? In that case, if two of them contain the same object, which one will be considered?
There can be more than one Shared OR’s associated to the same action.
If Shared OR1 and Shared OR2 have one object named OBJ1 each and if the action calls for OBJ1 then the order in which the shared ORs were associated will be considered. That means, if Shared OR1 was first associated then the OBJ1 from Shared OR1 will be taken into account.

16) Can the user toggle between using Local OR and shared OR for the same action?
Yes, it is possible to switch between one or the other types of ORs at any time.
To do so, the menu option is Test->Settings->Resources and choosing the options accordingly.

17) Are Shared ORs read only?
By default, shared ORs open as read only. To open them in order to edit them you will have to open them from Object Repository Manager.“ORM->File->Enable Editing”

18) Can we call UFT test from another test using scripting. Suppose there are 4 tests and I want to call these tests in a main script. Is this possible in UFT?

Yes. You can call 4 or even more scripts in your tests.For this, first you will need to make the Actions in the corresponding scripts re-usable.Then from the destination script you can make calls to these re-usable actions.

19) What is logical name of the object?

Logical name is a name given by UFT while creating an object in the repository to uniquely identify it from other objects in the application. This name would be used by the UFT to map the object name in script with its corresponding description in the object repository. Ex: Browser("Browser").Page("h2kinfosys") .Here h2kinfosys is the logical name of the object.

20) What is the file extension of the code file in UFT?

Code file extension is script.mts

21)What is the use of Text output value in UFT?

Text Output values enable you to capture text appearing on the application under test during run-time.

If parameterized, text output values will capture values appearing in each iteration which would be stored in the run-time data table for further analysis.

22) What is the difference between functions and actions in UFT?

Actions have their own Object Repository & Data Table. Actions help make your
Test modular and increase reuse. Example: You can divide your script into
Actions based on functionality like Login, Logout etc.

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.

23) What is the difference between check point and output value.

Check point is a verification point that compares a current value for a specified property with the expected value for that property. Based on this comparison, it will generate a PASS or FAIL status.

An output value is a value captured during the test run and can be stored in a specified location like the Datable or even a variable. Unlike Checkpoints, no PASS/FAIL status is generated.

24) How will you declare a variable in UFT ?

You declare using a DIM keyword..

Ex.Dim temp 'Will declare the temp variable

temp = 20 ' Will assign a value 20 to temp.

25) Can launch two instances of UFT on the same machine ?

No. You can work with only single instance of UFT on the same machine. But
UFT itself can work on multiple instances of the Application Under Test (AUT).
Ex: UFT can handle multiple IE browser windows.

26) What is the default extension for a function library ?

The extension is '.QFL'

27) What factors affect bitmap checkpoints ?

Bitmap checkpoints are affected by screen resolution and image size.

28) what is reusable action?

An action that can be called multiple times within or outside the same test is called reusable action. By default all actions are reusable.

29) How to give call to another action from one action?

Calling one action from the other can be done by “Inserting a call” to an existing action or by creating a new action

30)What is a Test Object
All objects in OR

31)What is run time object
they are the real(Actual) objects in the application on which operation are performed during run session.

32)How can you Associate function library to test
1.File>>Settings>>Resources
2.Click on Add button
3.Browse the path of this function library
4.Click on Apply and ok button

33)Explain different types of action in UFT?

When generating the test script, it includes only one action. Action contains the number of steps to be performed on application to test the application. There are three type of action in UFT:

Non-Reusable action: it can be called by test only once in which it is stored.
Reusable action: it can be called by test multiple times in which it is stored.
External action: it is reusable action but stored in external test. We can call external action but it will be available in read only mode we cannot perform any change to the External Action.

34)What is difference between Run time object and Test object?

The difference between Run time Object and Test object are:

Run time object are actual object in the application whereas test object are reference of the actual object.
Run time object always have same name whereas test object name varies in different environment.
Test object are used to identify the actual object in the application which is run time objects.
Run time object resides in the application whereas test object resides in the object repository.

35)Explain Measuring Transaction.

Measuring transaction means that to measure how much time it take to execute a set of step over the application. A transaction is collection of steps that we are intended to know how much time it take to execute. We can define the transaction by enclosing the set of steps with the start transaction and end transaction.

Start transaction: after encounter of start transaction time measurement start.
End transaction: it is used to stop the time measurement.

36)Explain different checkpoints in UFT.

Checkpoint is a point where UFT current value or property of the object with the expected value or property of the object. When we insert the check point in the test, then in keyword view checkpoint is added in front of current row and in editor view a checkpoint statement is added. UFT enable us with following types of check point:


1) 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, etc.

2) 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.

3) Bitmap Checkpoint checks an area of your Web page or application as a bitmap.

4) Table Checkpoint checks information within a table. For example, suppose your application or Web site contains a table listing all available flights from one place to another. You can add a table checkpoint to check that the time of the first flight in the table is correct.

5) Text Checkpoint checks that a text string is displayed in the appropriate place in your application or on a Web page.

6) Text Area Checkpoint checks that a text string is displayed within a defined area in a Windows application, according to specified criteria.

37)Why should we divide a test into three action calls?

When you create a new test, it contains a call to one action.

By dividing your tests into calls to multiple actions, you can design more modular and efficient tests.

37)What is Parameterizing Tests?

In UFT, in order to test the same operation with different values, parameters can be passed. When parameters are specified, the fixed values of the test are replaced by the parameters.

38)Data driven testing? Advantages?What all Different types?
- Data Driven Files Through Flat files( .txt,.doc) :we can collect these files from customer side.
Data Driven Tests From Excel sheet: These multiple inputs consists in excel sheet columns. We have to collect this test data from backend tables/production box .

39)Advantages of UFT :
1.Supports many technologies as mentioned in question 1
2.Scripting language –VB script
3.Learning/Competency
-its easy to learn VB script
- can learn this language in short time span.

40)Selection criteria for Manual test cases to be automated?
-is this test case repeatable
-does the test case requirement manual intervention
-are the execution steps very clear
-is the expected results clear enough to decide pass/fail status
-is the test case straight forward for automation
-do we have test data for test case


41)Difference between Sub and Function
A Sub procedure:

is a series of statements, enclosed by the Sub and End Sub statements
can perform actions, but does not return a value
can take arguments

Sub mysub()
some statements
End Sub

or
Sub mysub(argument1,argument2)
some statements
End Sub

A Function procedure:

is a series of statements, enclosed by the Function and End Function
statements
can perform actions and can return a value
can take arguments that are passed to it by a calling procedure
without arguments, must include an empty set of parentheses ()
returns a value by assigning a value to its name
mona1245
 
Posts: 3
Joined: Thu Mar 20, 2014 11:23 pm

Return to QTP - Quick Test Professional, HP UFT Online Training - Automation Testing

Who is online

Users browsing this forum: No registered users and 1 guest

cron