1. How to make arguments optional in a function?

this is not possible as default VBS doesn't support this. Instead you can pass a blank scring and have a default value if arguments r not required.

2. How to verify the Cursor focus of a certain field?

Use "focus" property of "GetRoProperty" method"

3. Any limitation to XML Checkpoints?

Mercury has determined that 1.4MB is the maximum size of a XML file that QTP 6.5 can handle

4. How to add a runtime parameter to a datasheet?

DataTable.LocalSheet
The following example uses the LocalSheet property to return the local sheet of the run-time Data Table in order to add a parameter (column) to it.
MyParam=DataTable.LocalSheet.AddParameter("Time", "5:45")

5. How to retrieve the property of an object?

using "GetRoProperty".

6. How to open any application during Scripting?

SystemUtil , object used to open and close applications and processes during a run session.
(a) A SystemUtil.Run statement is automatically added to your test when you run an application from the Start menu or the Run dialog box while recording a test
E.g : SystemUtil.Run "Notepad.exe" SystemUtil.CloseDescendentProcesses ( Closes all the processes opened by QTP )

7. How to covert a String to an integer?

CInt()---> a conversion function available.

8. Explain the terms TEST and Business Component?

Test-A collection of steps organized into one or more actions, which are used to verify that your application performs as expected. By default each test begins with a single action. Business Component-A collection of steps representing a single task in your application. Business components (also known as components) are combined into specific scenarios to build business process tests in Mercury Quality Center with Business Process Testing. A component does not contain actions, you add steps directly to a componenet.

9. What do you mean by iteration?

Each run session that uses a different set of parameterized data is called an iteration.

10. What are the views available in QuickTest Professional (QTP)?

(1) Keyword View
(2) Expert View

Download Interview PDF

11. How many Add-ins comes by default with QuickTest Professional (QTP)?

There are 3 Add-ins comes with QTP:
(1) ActiveX
(2) Visual Basic
(3) Web

12. What is output value?

An output value is a value retrieved during the run session and entered into your Data Table or saved as a variable or a parameter. Each run session that uses a different set of parameterized data is called an iteration.

13. How many tabs are available in Debug Viewer Pane?

The Debug Viewer pane contains three tabs to assist you in debugging your test or component-Watch Expressions, Variables, and Command. Watch Expressions The Watch Expressions tab enables you to view the current value of any variable or other VBScript expression. Variables The Variables tab enables you to view the current value of all variables that have been recognized up to the last step performed in the run session. Command The Command tab enables you to execute a line of script in order to set or modify the current value of a variable or VBScript object in your test or component. When you continue the run session, QuickTest uses the new value that was set in the command.

14. What is Active Screen?

The Active Screen provides a snapshot of your application as it appeared when you performed a certain step during a recording session.

15. Explain different recording modes?

QuickTest's normal recording mode records the objects in your application and the operations performed on them. This mode is the default and takes full advantage of QuickTest's test object model, recognizing the objects in your application regardless of their location on the screen. Analog Recording - 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, QuickTest records and tracks every movement of the mouse as you drag the mouse around a screen or window. This mode is useful for recording operations that cannot be recorded at the level of an object, for example, recording a signature produced by dragging the mouse. Note: You cannot edit analog recording steps from within QuickTest. ? Low-Level Recording - enables you to record on any object in your application, whether or not QuickTest 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. Use low-level recording for recording tests in an environment or on an object not recognized by QuickTest. You can also use low-level recording if the exact coordinates of the object are important for your test. Note: Steps recorded using low-level mode may not run correctly on all objects.

16. Explain different types of checkpoints?

There are 10 types of checkpoints you can insert: 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. 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. Bitmap Checkpoint checks an area of your Web page or application as a bitmap. 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. Text Checkpoint checks that a text string is displayed in the appropriate place in your application or on a Web page. Text Area Checkpoint checks that a text string is displayed within a defined area in a Windows application, according to specified criteria. Accessibility Checkpoint identifies areas of your Web site that may not conform to the World Wide Web Consortium (W3C) Web Content Accessibility Guidelines. 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. Database Checkpoint checks the contents of a database accessed by your application. XML Checkpoint checks the data content of XML documents in XML files or XML documents in Web pages and frames.

17. How many types of parameters are there?

There are four types of parameters: 1. Test, action or component parameters 2. Data Table parameters 3. Environment variable parameters 4. Random number parameters Test, action or component parameters enable you to use values passed from your test or component, or values from other actions in your test.0 Data Table parameters enable you to create a data-driven test (or action) that runs several times using the data you supply. In each repetition, or iteration, QuickTest uses a different value from the Data Table. Environment variable parameters enable you to use variable values from other sources during the run session. These may be values you supply, or values that QuickTest generates for you based on conditions and options you choose. Random number parameters enable you to insert random numbers as values in your test or component.

18. What is parameter in QTP?

A parameter is a variable that is assigned a value from an external data source or generator. If you wish to parameterize the same value in several steps in your test or component, you may want to consider using the Data Driver rather than adding parameters manually.

19. When and Why to use Descriptive programming?

Below are some of the situations when Descriptive Programming can be considered useful:
The objects in the application are dynamic in nature and need special handling to identify the object. The best example would be of clicking a link which changes according to the user of the application, Ex. “Logout <<UserName>>”.
When object repository is getting huge due to the no. of objects being added. If the size of Object repository increases too much then it decreases the performance of QTP while recognizing a object.
When you don’t want to use object repository at all. Well the first question would be why not Object repository? Consider the following scenario which would help understand why not Object repository

Scenario 1: Suppose we have a web application that has not been developed yet. Now QTP for recording the script and adding the objects to repository needs the application to be up, that would mean waiting for the application to be deployed before we can start of with making QTP scripts. But if we know the descriptions of the objects that will be created then we can still start off with the script writing for testing

20. How to use Descriptive programming?

There are two ways in which descriptive programming can be used
By creating properties collection object for the description.
By giving the description in form of the string arguments.

By creating properties collection object for the description.

To use this method you need first to create an empty description

Dim obj_Desc ‘Not necessary to declare
Set obj_Desc = Description.Create

Now we have a blank description in “obj_Desc”. Each description has 3 properties “Name”, “Value” and “Regular Expression”.

obj_Desc(“html tag”).value= “INPUT”

21. When should I use SMART Identification?

SMART Identification
Smart Identification is nothing but an algorithm used by QTP when it is not able to recognize one of the object. A very generic example as per the QTP manual would be, A photograph of a 8 year old girl and boy and QTP records identification properties of that girl when she was 8, now when both are 10 years old then QTP would not be able to recognize the girl. But there is something that is still the same, that is there is only one girl in the photograph. So it kind of PI (Programmed intelligence) not AI.

When should I use SMART Identification? Something that people don't think about too much. But the thing is that you should disable SI while creating your test cases. So that you are able to recognize the objects that are dynamic or inconsistent in their properties. When the script has been created, the SI should be enabled,so that the script does not fail in case of small changes. But the developer of the script should always check for the test results to verify if the SI feature was used to identify a object or not. Sometimes SI needs to be disabled for particular objects in the OR, this is advisable when you use

22. What is a Recovery Scenario?

Recovery scenario gives you an option to take some action for recovering from a fatal error in the test. The error could range in from occasional to typical errors. Occasional error would be like "Out of paper" popup error while printing something and typical errors would be like "object is disabled" or "object not found". A test case have more then one scenario associated with it and also have the priority or order in which it should be checked.

23. Can I change properties of a test object?

Yes. You can use SetTOProperty to change the test object properties. It is recommended that you switch off the Smart Identification for the object on which you use SetTOProperty function.

24. Where to use function or action?

Well answer depends on the scenario. If you want to use the OR feature then you have to go for Action only. If the functionality is not about any automation script i.e. a function like getting a string between to specific characters, now this is something not specific to QTP and can be done on pure VB Script, so this should be done in a function and not an action. Code specific to QTP can also be put into an function using DP. Decision of using function/action depends on what any one would be comfortable using in a given situation.

25. What is checkpoint in QTP?

Checkpoint is basically a point in the test which validates for truthfulness of a specific things in the AUT. There are different types of checkpoints depending on the type of data that needs to be tested in the AUT. It can be text, image/bitmap, attributes, XML etc....

Download Interview PDF

26. How can I check if a environment variable exist or not?

When we use Environment("Param1").value then QTP expects the environment variable to be already defined. But when we use Environment.value("Param1") then QTP will create a new internal environment variable if it does not exists already. So to be sure that variable exist in the environment try using Environment("Param1").value.

27. How can I import environment from a file on disk?

Environment.LoadFromFile "C:Env.xml"

28. How to connect to a database?

code:
Const adOpenStatic = 3
Const adLockOptimistic = 3
Const adUseClient = 3
Set objConnection = CreateObject("ADODB.Connection")
Set objRecordset = CreateObject("ADODB.Recordset")
objConnection.Open "DRIVER={Microsoft ODBC for Oracle};UID=;PWD=
"
objRecordset.CursorLocation = adUseClient
objRecordset.CursorType = adopenstatic
objRecordset.LockType = adlockoptimistic
ObjRecordset.Source="select field1,field2 from testTable"
ObjRecordset.ActiveConnection=ObjConnection ObjRecordset.Open 'This will execute your Query
If ObjRecordset.recordcount>0 then
Field1 = ObjRecordset("Field1").Value
Field2 = ObjRecordset("Field2").Value
End if

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

30. Few basic questions on commonly used Excel VBA functions?

common functions are:
Coloring the cell
Auto fit cell
setting navigation from link in one cell to other saving

31. Types of properties that Quick Test learns while recording?

(a) Mandatory
(b) Assistive .
In addition to recording the mandatory and assistive properties specified in the Object Identification dialog box, QuickTest can also record a backup ordinal identifier for each test object. The ordinal identifier assigns the object a numerical value that indicates its order relative to other objects with an otherwise identical description (objects that have the same values for all properties specified in the mandatory and assistive property lists). This ordered value enables QuickTest to create a unique description when the mandatory and assistive properties are not sufficient to do so.

32. How does Parameterization and Data-Driving relate to each other in QTP?

To datadrive we have to parameterize.i.e. we have to make the constant value as parameter, so that in each iteraration(cycle) it takes a value that is supplied in run-time datatable. Through parameterization 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.

33. Differences between QuickTest Professional (QTP) and Winrunner?

(a) QTP is object bases Scripting ( VBS) where Winrunner is TSL (C based) Scripting.
(b) QTP supports ".NET" application Automation not available in Winrunner
(c) QTP has "Active Screen" support which captures the application, not available in WR.
(d) QTP has "Data Table" to store script values , variables which WR does not have.
(e) Using a “point and click” capability you can easily interface with objects, their definitions and create checkpoints after having recorded a script - without having to navigate back to that location in your application like you have to with WinRunner. This greatly speeds up script development.

34. What is the difference between check point and output value?

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]

35. 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.

36. How to handle dynamic objects in QuickTest Professional (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.

37. How to handle Run-time errors?

On Error Resume Next : causes execution to continue with the statement immediately following the statement that caused the run-time error, or with the statement immediately following the most recent call out of the procedure containing the On Error Resume Next statement. This allows execution to continue despite a run-time error. You can then build the error-handling routine inline within the procedure.
Using "Err" object msgbox "Error no: " & " " & Err.Number & " " & Err.description & " " & Err.Source & Err.HelpContext

38. How many types of Actions are there in QuickTest Professional (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.

39. How to export QuickTest Professional (QTP) results to an .xls file?

By default it creates an "XML" file and displays the results

40. How to export data present in Datatable to an .xls file?

DataTable.Export "....xls file name..."

Download Interview PDF

41. How does QuickTest Professional (QTP) identifies the object in the application?

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

42. 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. Try it out. All the Best.

43. Explain the concept of object repository and how QuickTest Professional (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.

44. What do you call the window testdirector-testlab?

"Execution Grid". It is place from where we Run all Manual / Automated Scripts

45. What is the file extension of the code file and 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

46. How do u do batch testing in WR and is it possible to do in QTP, if so explain?

Batch Testing in WR is nothing but running the whole test set by selecting "Run Testset" from the "Execution Grid".The same is possible with QTP also. If our test cases are automated then by selecting "Run Testset" all the test scripts can be executed. In this process the Scripts get executed one by one by keeping all the remaining scripts in "Waiting" mode.

47. What is the Diff between Image check-point and Bit map Check point?

Image checkpoints enable you to check the properties of a Web image. You can check an area of a Web page or application as a bitmap. While creating a test or component, you specify the area you want to check by selecting an object. You can check an entire object or any area within an object. QuickTest captures the specified object as a bitmap, and inserts a checkpoint in the test or component. You can also choose to save only the selected area of the object with your test or component in order to save disk Space 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 bitmap checkpoints for all supported testing environments (as long as the appropriate add-ins are loaded).
Note: The results of bitmap checkpoints may be affected by factors such as operating system, screen resolution, and color settings.

48. How To clear the AutoComplete?

1 In your Internet Explorer's menu bar, choose Tools > Internet Options > Content tab.
2 Click AutoComplete in the Personal information area. The AutoComplete Settings dialog box opens.
3 In the Use AutoComplete for area, clear the User names and passwords on forms option.
4 Click OK to save your changes and close the AutoComplete Settings dialog box, then click OK again to close the Internet Options dialog box.

49. How to execute a WinRunner Script in QuickTest Professional (QTP)?

(a) TSLTest.RunTest TestPath, TestSet [, Parameters ] --> Used in QTP 6.0 used for backward compatibility Parameters : The test set within Quality Center, in which test runs are stored. Note that this argument is relevant only when working with a test in a Quality Center project. When the test is not saved in Quality Center, this parameter is ignored.
e.g : TSLTest.RunTest "D:test1", ""
(b)TSLTest.RunTestEx TestPath, RunMinimized, CloseApp [, Parameters ] TSLTest.RunTestEx "C:WinRunnerTestsbasic_flight", TRUE, FALSE, "MyValue" CloseApp : Indicates whether to close the WinRunner application when the WinRunner test run ends. Parameters : Up to 15 WinRunner function argument

50. Object Repositories types, Which and when to use?

Deciding Which Object Repository Mode to Choose
To choose the default object repository mode and the appropriate object repository mode for each test, you need to understand the differences between the two modes.
In general, the object repository per-action mode is easiest to use when you are creating simple record and run tests, especially under the following conditions:

You have only one, or very few, tests that correspond to a given application, interface, or set of objects.
You do not expect to frequently modify test object properties.
You generally create single-action tests.
Conversely, the shared object repository mode is generally the preferred mode when:

You have several tests that test elements of the same application, interface, or set of objects.

51. Discuss QuickTest Professional (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.

52. What does it mean when a check point is in red color? what do you do?

A red color indicates failure. Here we analyze the the cause for failure whether it is a Script Issue or Envronment Issue or a Application issue.

53. How do u create new test sets in TD?

Login to TD.
Click on "Test Lab" tab.
Select the Desired folder under which we need to Create the Test Set. ( Test Sets can be grouped as per module.) Click on "New Test Set or Ctrl+N" Icon to create a Test Set.

54. What are the properties you would use for identifying a browser and 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")....

55. If an application name is changes frequently i.e while recording it has name, in this case how does QTP handles?

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

Download Interview PDF

56. IF we use batch testing.the result shown for last action only.in that how can i get result for every action.?

You can click on the icon in the tree view to view the result of every action

57. How to Import data from a .xls file to Data table during Runtime?

Datatable.Import "...XLS file name..."
DataTable.ImportSheet(FileName, SheetSource, SheetDest)
DataTable.ImportSheet "C:name.xls" ,1 ,"name"

58. Syntact for how to call one script from another? and Syntax to call one Action in another?

RunAction ActionName, [IterationMode , IterationRange , Parameters]
Here the actions becomes reusable on making this call to any Action.
IterationRange String Not always required. Indicates the rows for which action iterations will be performed. Valid only when the IterationMode is rngIterations. Enter the row range (i.e. "1-7"), or enter rngAll to run iterations on all rows.
If the action called by the RunAction statement includes an ExitAction statement, the RunAction statement can return the value of the ExitAction's RetVal argument.

59. How the exception handling can be done using QuickTest Professional (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 .......

60. Analyzing the Checpoint results?

Standard Checpoint :By adding standard checkpoints to your tests or components, you can compare the expected values of object properties to the object's current values during a run session. If the results do not match, the checkpoint fails.

61. What are the different scripting languages you could use when working with QTP?

Visual Basic (VB),
XML,
JavaScript,
Java,
HTML

62. Explain the keyword createobject 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.

63. 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.

64. Explain the concept of how QuickTest Professional (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.

65. Can we Script any test case with out having Object repository? or Using Object Repository is a must?

No. You can script with out Object repository by knowing the Window Handlers, spying and recognizing the objects logical names and properties available.

66. Why 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.

67. What is Object Spy in QuickTest Professional (QTP)?

Using the Object Spy, you can view the properties of any object in an open application. You use the Object Spy pointer to point to an object. The Object Spy displays the selected object's hierarchy tree and its properties and values in the Properties tab of the Object Spy dialog box.

68. How many ways we can parameterize data in QuickTest Professional (QTP)?

There are four types of parameters:
Test, action or component parameters enable you to use values passed from your test or component, or values from other actions in your test.
Data Table parameters enable you to create a data-driven test (or action) that runs several times using the data you supply. In each repetition, or iteration, QuickTest uses a different value from the Data Table.
Environment variable parameters enable you to use variable values from other sources during the run session. These may be values you supply, or values that QuickTest generates for you based on conditions and options you choose.
Random number parameters enable you to insert random numbers as values in your test or component. For example, to check how your application handles small and large ticket orders, you can have QuickTest generate a random number and insert it in a number of tickets edit field.

69. How to use the Object spy in QuickTest Professional (QTP) 8.0 version?

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.

70. How to Creating an Output Value using QuickTest Professional (QTP)?

1 Start QuickTest and open the Parameter test.
2 Save the test as Output.
3 Confirm that the Active Screen option is enabled.
4 Select the text you want to use as an output value.
5 Set the output value settings.
6 Modify the table checkpoint.
7 Save the test.

Download Interview PDF

71. Explain the check points in QuickTest Professional (QTP)?

A checkpoint verifies that expected information is displayed in a Application while the test is running. You can add eight types of checkpoints to your test for standard web objects using QTP.

• A page checkpoint checks the characteristics of a Application
• A text checkpoint checks that a text string is displayed in the appropriate place on a Application.
• An object checkpoint (Standard) checks the values of an object on a Application.
• An image checkpoint checks the values of an image on a Application.
• A table checkpoint checks information within a table on a Application
• An Accessiblity checkpoint checks the web page for Section 508 compliance.
• An XML checkpoint checks the contents of individual XML data files or XML documents that are part of your Web application.
• A database checkpoint checks the contents of databases accessed by your web site

72. Explain in brief about the QuickTest Professional (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.

73. How to analyzing Test Results using QuickTest Professional (QTP)?

When QuickTest finishes running the test, the Test Results window opens.
Initially, the Test Results window contains two panes for displaying the key elements of your test run.
. The left pane displays the results tree, an icon-based view of the steps that were performed while the test was running. The results tree is organized according to the Web pages visited during the test run and can be expanded (+) to view each step. The steps performed during the test run are represented by icons in the tree. You can instruct QuickTest to run a test or action more than once using different sets of data in each run. Each test run is called an iteration, and each iteration is numbered. (The test you ran had only one iteration.)
. The right pane displays the test results details. The iteration summary table indicates which iterations passed and which failed. The status summary table indicates the number of checkpoints or reports that passed, failed, and raised warnings during the test.
1 View the test results for a specific step.
In the results tree, expand (+) Test Recording Summary > Recording Iteration 1 (Row 1) > Action1 Summary > your application > your test name .

74. In how many ways we can add check points to an application using QTP?

We can add checkpoints while recording the application or we can add after recording is completed using Active screen (Note : To perform the second one The Active screen must be enabled while recording).

75. What is Parameterizing Tests?

When you test your application, you may want to check how it performs the same operations with multiple sets of data. For example, suppose you want to check how your application responds to ten separate sets of data. You could record ten separate tests, each with its own set of data. Alternatively, you can create a parameterized test that runs ten times: each time the test runs, it uses a different set of data.

76. Why use Regular Expressions?

you created a text checkpoint that searched for a specific text string. You can use regular expressions to increase the flexibility and adaptability of your tests.
Regular expressions enable QuickTest to identify objects and text strings with varying values. You can use regular expressions when defining the properties of an object, the methods of an argument, when parameterizing a step, and when creating checkpoints with varying values.

77. What is the use of Text output value in QuickTest Professional (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.

78. What are the Features and Benefits of Quick Test Pro (QTP 8.0)?

Operates stand-alone, or integrated into Mercury Business Process Testing and Mercury Quality Center. Introduces next-generation zero-configuration Keyword Driven testing technology in Quick Test Professional 8.0 allowing for fast test creation, easier maintenance, and more powerful data-driving capability. Identifies objects with Unique Smart Object Recognition, even if they change from build to build, enabling reliable unattended script execution. Collapses test documentation and test creation to a single step with Auto-documentation technology. Enables thorough validation of applications through a full complement of checkpoints.

79. What is Checking Bitmaps?

You can check an area of a Web page or application as a bitmap. While creating a test or component, you specify the area you want to check by selecting an object. You can check an entire object or any area within an object. QuickTest captures the specified object as a bitmap, and inserts a checkpoint in the test or component. You can also choose to save only the selected area of the object with your test or component in order to save disk space.
When you run the test or component, QuickTest compares the object or selected area of the object currently displayed on the Web page or application with the bitmap stored when the test or component was recorded. If there are differences, QuickTest 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. For more information on test results of a checkpoint, see Viewing Checkpoint Results.

80. 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..

81. What is QuickTest Professional (QTP 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 in parameterizing 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 < Debug Viewer.)
. Status bar-Displays the status of the QuickTest application.

82. Explain about the Test Fusion Report of QuickTest Professional (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.

83. Does QuickTest Professional (QTP) is Unicode compatible?

QTP 6.5 is not but QTP 8.0 is expected to be Unicode compatabile by end of December 2004.

84. What are the types of Object Repositorys 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.

85. What is keyword view and Expert view in QTP?

QuickTest'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.

Download Interview PDF

86. What are the Features and 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 scriot language
4. Better error handling mechanism
5. Excellent data driven testing features

87. How to handle the exceptions using recovery secnario manager in QuickTest Professional (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

88. What information do the columns in the Keyword View show for each step?

As you recorded your test, QuickTest generated steps in the Keyword View representing each operation you performed in the Web browser.
The columns in the Keyword View show different information for each step, as follows:

. Item-Displays the item for the step (test object, utility object, function call, or statement) in a hierarchical icon-based tree.
. Operation-The operation to be performed on the item, for example, Click or Select.
. Value-The argument values for the selected operation, for example, the mouse button to use when clicking the image.
. Assignment-The assignment of a value to or from a variable so you can use the value later in the test.
. Comment-Any textual information you want to add regarding the step, for example, Return to page used in first step of the test.
. Documentation-Auto-documentation of what the step does, in an easy-to-understand sentence, for example, Click the “findFlights” image.

89. Explain QuickTest Professional (QTP) Testing process?

The QuickTest testing process consists of 6 main phases:

1. Create your test plan
Prior to automating there should be a detailed description of the test including the exact steps to follow, data to be input, and all items to be verified by the test. The verification information should include both data validations and existence or state verifications of objects in the application.

2. Recording a session on your application
As you navigate through your application, QuickTest graphically displays each step you perform in the form of a collapsible icon-based test tree. A step is any user action that causes or makes a change in your site, such as clicking a link or image, or entering data in a form.

2. Enhancing your test
o Inserting checkpoints into your test lets you search for a specific value of a page, object or text string, which helps you identify whether or not your application is functioning correctly.
NOTE: Checkpoints can be added to a test as you record it or after the fact via the Active Screen. It is much easier and faster to add the checkpoints during the recording process.
o Broadening the scope of your test by replacing fixed values with parameters lets you check how your application performs the same operations with multiple sets of data.
o Adding logic and conditional statements to your test enables you to add sophisticated checks to your test.

90. What is test object model in QuickTest Professional (QTP)?

The test object model is a large set of object types or classes that QuickTest uses to represent the objects in your application. Each test object class has a list of properties that can uniquely identify objects of that class and a set of relevant methods that QuickTest can record for it.

A test object is an object that QuickTest creates in the test or component to represent the actual object in your application. QuickTest stores information about the object that will help it identify and check the object during the run session.
A run-time object is the actual object in your Web site or application on which methods are performed during the run session.
When you perform an operation on your application while recording, QuickTest:

91. 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.

92. If I give some thousand tests to execute in 2 days what do you do?

Adhoc testing is done. It Covers the least basic functionalities to verify that the system is working fine.

93. 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 supresses only the result window, but a og will be created and can viewed manulaly which cannot be restricted from getting created.

94. To which environments does QuickTest Professional (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.

95. How does QTP identifes the object in the application?

QTP identifies the object in the application by LogicalName and Class.
For example :
The Edit box is identified by
Logical Name : PSOPTIONS_BSE_TIME20
Class: WebEdit

96. Table and DB Checkpoints?

By adding table checkpoints to your tests or components, you can check that a specified value is displayed in a cell in a table on your application. By adding database checkpoints to your tests or components, you can check the contents of databases accessed by your application. The results displayed for table and database checkpoints are similar. When you run your test or component, QuickTest compares the expected results of the checkpoint to the actual results of the run session. If the results do not match, the checkpoint fails. You can check that a specified value is displayed in a cell in a table by adding a table checkpoint to your test or component. For ActiveX tables, you can also check the properties of the table object. To add a table checkpoint, you use the Checkpoint Properties dialog box. Table checkpoints are supported for Web and ActiveX applications, as well as for a variety of external add-in environments. You can use database checkpoints in your test or component to check databases accessed by your Web site or application and to detect defects. You define a query on your database, and then you create a database checkpoint that checks the results of the query. Database checkpoints are supported for all environments supported by QuickTest, by default, as well as for a variety of external add-in environments.

There are two ways to define a database query:
(a) Use Microsoft Query. You can install Microsoft Query from the custom installation of Microsoft Office.
(b) Manually define an SQL statement.
The Checkpoint timeout option is available only when creating a table checkpoint. It is not available when creating a database checkpoint

97. Text/Text Area Checkpoint?

In the Text/Text Area Checkpoint Properties dialog box, you can specify the text to be checked as well as which text is displayed before and after the checked text. These configuration options are particularly helpful when the text string you want to check appears several times or when it could change in a predictable way during run sessions.
Note: In Windows-based environments, if there is more than one line of text selected, the Checkpoint Summary pane displays [complex value] instead of the selected text string. You can then click Configure to view and manipulate the actual selected text for the checkpoint.
QuickTest automatically displays the Checked Text in red and the text before and after the Checked Text in blue. For text area checkpoints, only the text string captured from the defined area is displayed (Text Before and Text After are not displayed). To designate parts of the captured string as Checked Text and other parts as Text Before and Text After, click the Configure button. The Configure Text Selection dialog box opens

98. How to supress warnings from the Test results page?

From the Test results Viewer "Tools > Filters > Warnings"...must be "Unchecked".

99. What is Checkpoints for QuickTest Professional (QTP)?

A checkpoint verifies that expected information is displayed in your application while the test is running.

100. How to add a standard checkpoint in your test?

1. Start QuickTest and open your test.
In the Open Test dialog box, locate and select your test, then click Open.

2. Save the test as Checkpoint.
Select File > Save As. Save the test as Checkpoint.

3. Confirm that the Active Screen option is enabled.
If you do not see the Active Screen at the bottom of the QuickTest window, click the Active Screen button, or choose View > Active Screen.

4. Locate the page where you want to add a standard checkpoint.

5 Create a standard checkpoint.
In the Active Screen, right-click element in your application and choose Insert Standard Checkpoint.

6 Save the test.

Download Interview PDF

101. What is the extension of script and object repository files?

Object Repository : .tsr , Script : .mts, Excel : Default.xls

102. When we try to use test run option Run from Step, the browser is not launching automatically why?

This is default behaviour.

103. How to add a page checkpoint to your test?

The page checkpoint checks that the number of links and images in the page when you run your test is the same as when you recorded your test.
1 Locate the page where you want to add a page checkpoint.
2 Create a page checkpoint.
Right-click anywhere in the Active Screen, and choose Insert Standard Checkpoint. The Object Selection - Checkpoint Properties dialog box opens. Note that this dialog box may include different elements, depending on where you click in the Active Screen.
3 Save the test.

104. How to Run a Test using QuickTest Professional (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.

105. What is the QuickTest Professional (QTP) testing process?

QTP testing process consist of seven steps-
► Preparing to recoding
► Recording
► Enhancing your script
► Debugging
► Run
► Analyze
► Report Defects

106. How to Save your test using QuickTest Professional (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.

107. 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.

108. How to Start recording using QuickTest Professional (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.

109. How many types of recording facility are available in QuickTest Professional (QTP)?

QTP provides three types of recording methods-
► Context Recording (Normal)
► Analog Recording
► Low Level Recording

110. How many types of Parameters are available in QuickTest Professional (QTP)?

QTP provides three types of Parameter-
► Method Argument
► Data Driven
► Dynamic

111. How to open a new test using QuickTest Professional (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.

112. 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.

113. What is the basic concept of QuickTest Professional (QTP)?

QTP is based on two concept-
► Recording
► Playback

114. What is QuickTest Professional (QTP)?

QuickTest is a graphical interface record-playback automation tool. It is able to work with any web, java or windows client application. Quick Test enables you to test standard web objects and ActiveX controls. In addition to these environments, QuickTest Professional also enables you to test Java applets and applications and multimedia objects on Applications as well as standard Windows applications, Visual Basic 6 applications and .NET framework applications...
QTP is Mercury Interactive Functional Testing Tool. QTP stands for Quality Test Professional.

Mercury QuickTest Professional: provides the industry's best solution for functional test and regression test automation - addressing every major software application and environment. This next-generation automated testing solution deploys the concept of Keyword-driven testing to radically simplify test creation and maintenance. Unique to QuickTest Professional'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.

115. Which scripting language used by QuickTest Professional (QTP)?

QTP using VB scripting.

Download Interview PDF