T Automation Questions

download T Automation Questions

of 23

Transcript of T Automation Questions

  • 8/14/2019 T Automation Questions

    1/23

    1. What is Test Frame Work?

    2. How comfortable are you in VB Scripting?

    3. What is Description Object?4. What are SetToProperty, SetRoProperty, GetToProperty scripting?

    5. What is the difference between version 6.5 and 8.2?

    6. What is the difference between Normal mode and Fast mode?7. How do you invoke the application through QTP?

    8. How do you close the Task Manager through QTP?

    9. How will you load the object during run time?10. How will you handle the situation when object is not captured during record?

    11. What is test object?

    12. How QTP recognizes the objects stored in object repository

    13. What is post recovery scenario?14. What is reusable action and how the same can be implemented (process)

    15. How will u integrate oracle with QTP

    16. How QTP integrate with application

    17. What is object repository?18. What are all the fields present in object repository?

    19. What is smart identification?20. What are the mandatory properties for a text box (scenario?)

    21. What is Checkpoint?

    22. What is object?

    23. What are the properties of object?24. What is Action?

    25. What will be there in Keyword view and Expert View?

    26. What is regular expression how will u implement it27. Where the checkpoints are stored

    28. What is database checkpoint, how will u parameterize the database from separatedata table29. How will u handle application crash using recovery scenario manager (Step By

    Step Process)

    30. What is Virtual Object?31. What is the difference between calling a function and reusing an action?

    32. How QTP support all types of applications (Platforms)

    33. What is the difference between application testing and product testing?

    34. What is throw object?35. What is Run-time Data?

    36. How will you enhance the script?

    37. Can objects recogonised without repository?38. Where did u automate in ur project

    39. Any challenge that faced in ur project

    40. Batch test,run action41. Purpose of automation

    42. Diff ways of parameterising

    43. Error handled other than recovery scenario manager

    44. Diff betw WR and QTP

  • 8/14/2019 T Automation Questions

    2/23

    45. What kind of errors can be handled?

    46. How you used DDT in QTP?

    47. Difference between keyword driven test and DDT?48. How did you use regular expression in QTP and also in Win Runner?

    49. How do you learn the object in QTP?

    50. How will you handle custom object in QTP?51. Differences in QTP and Win Runner.

    52. Give us the Definition for Integration Testing, Regression Testing System Testing

    53. How will you report the bug and explain the defect tracking Sheet you handled?54. What In-string function will do?

    55. What is L-trim function will do?

    56. WinRunner and QTP difference?

    57. In website, protocol has been changed http: to https what you will do? Tell meyour Approach?

    58. What Framework you are following?

    59. How to load the object repository at run time?

    60. How much strong on VB and C?61. How to compare the 2 strings?

    62. What is the Silent mode in WinRunner?63. Have you worked with Quality Center?

    64. Have you used Test Director?

    65. What is QTP Test Frame work?

    66. Definitions for Keyword view and Tree View?67. What is Smart Identification?

    68. What is Object Repository?

    69. What is your experience level in QTP?70. What is your Role and Responsibilities In QTP with your current organisation?

    71. Explain the following:

    72. Import and Export of files.73. Random testing of 500 test cases.

    74. Invoking of application

    75. Opening notepad in QTP &Writing of Test Result in Notepad.76. Merging of Two Repositories

    77. Datafile / Verification of data file when file is not available in local system.

    78. Business process component / Types and usage.

    79. Opening of notepad in QTP to write and execute the coding.80. How to find local host name using QTP

    81. How to handle exception when data table is not available in local host system or

    Path is not correct (Explain Statement with example)82. Runtime dynamic settings.

    83. Script generated after applying database check point.

    84. Script generated at the time of setting runtime property.85. Types of exception handling and script for that.

    86. Scripting

  • 8/14/2019 T Automation Questions

    3/23

    Difference 8.2 to 9.5

    87. QTP 9.5 offers all add-ins integrated with the core installation package. Though

    you still need to buy add-ins separately to get them activated.88. For installing QTP 9.5 you have to do a clean uninstall (as mentioned in the HP

    KB) of previous versions. That means, now on, you would not be able to upgrade

    from the previous89. Mercury Screen Recorder :

    Capture your entire run session in a movie clip or capture only the segments with

    errors, and then view your movie from the Test Results window.

    Dynamic Management of Object Repositories:

    QuickTest now has a new RepositoriesCollection reserved object that you can

    use to programmatically manage the set of object repositories that are associated

    with an action during a run session. versions.

    90. Object Repository Manager:You can use the Object Repository Manager to manage all of the shared object

    repositories in your organization from one, central location. This includes addingand defining objects, modifying objects and their descriptions, parameterizing test

    object property values, maintaining and organizing repositories, and importing

    and exporting repositories in XML format.You can open multiple object repositories at the same time. Each object repository

    opens in its own resizable document window. This enables you to compare the

    content of the repositories, to copy or move objects from one object repository to

    another, and so forth.

    Object Repository Merge Tool:

    You can use the Object Repository Merge Tool to merge the objects from twoshared object repositories into a single shared object repository. You can also usethe Object Repository Merge Tool to merge objects from the local object

    repository of one or more actions or components into a shared object repository.

    When you merge objects from two source object repositories, the content is

    copied to a new, target object repository, ensuring that the information in the

    source repositories remains unchanged.

    If any conflicts occur during the merge, for example, if two objects have the same

    name and test object class, but different test object descriptions, the relevant

    objects are highlighted in the source repositories, and the Resolution Options panedetails the conflict and possible resolutions.

    Multiple Object Repositories per Action or Component:

    QuickTest provides several options for storing and accessing test objects. You canstore the test objects for each action or component in its corresponding local

    object repository, which is unique for each action and component. You can also

    store test objects in one or more shared object repositories that can be used inmultiple actions and components. Alternatively, you can use a combination of

  • 8/14/2019 T Automation Questions

    4/23

  • 8/14/2019 T Automation Questions

    5/23

    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 minimized then, hold the Ctrl button and

    activate the required window to and release the Ctrl button.94. How Does Run time data (Parameterization) is handled in QTP? - You can

    then enter test data into the Data Table, an integrated spreadsheet with the full

    functionality of Excel, to manipulate data sets and create multiple test iterations,without programming, to expand test case coverage. Data can be typed in or

    imported from databases, spreadsheets, or text files.

    95. What is keyword view and Expert view in QTP? - Quick Tests KeywordDriven 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 Quick Test Professional automatically generates. Any

    changes made in the Expert View are automatically synchronized with the

    Keyword View.

    96. Explain about the Test Fusion Report of QTP? - Once a tester has run a test, aTest Fusion report displays all aspects of the test run: a high-level results

    overview, an expandable Tree View of the test specifying exactly whereapplication 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 Test Fusion reports with Quick Test

    Professional, you can share reports across an entire QA and development team.97. Which environments does QTP support? - Quick Test Professional supports

    functional testing of all enterprise environments, including Windows, Web,..NET,

    Java/J2EE, SAP, Siebel, Oracle, PeopleSoft, Visual Basic, ActiveX, mainframeterminal emulators, and Web services.

    98. What is QTP? - Quick Test is a graphical interface record-playback automation

    tool. It is able to work with any web, java or windows client application. QuickTest enables you to test standard web objects and ActiveX controls. In addition to

    these environments, Quick Test Professional also enables you to test Java applets

    and applications and multimedia objects on Applications as well as standardWindows applications, Visual Basic 6 applications and.NET framework

    applications

    99. Explain QTP testing process? - Quick Test testing process consists of 6 main

    phases:

    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.

    Recording a session on your application - As you navigate through your

    application, Quick Test 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 achange in your site, such as clicking a link or image, or entering data in a form.

  • 8/14/2019 T Automation Questions

    6/23

    Enhancing your test - 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 toa 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. Broadening the scope

    of your test by replacing fixed values with parameters lets you check how yourapplication performs the same operations with multiple sets of data. Adding logic

    and conditional statements to your test enables you to add sophisticated checks to

    your test.

    Debugging your test - If changes were made to the script, you need to debug it tocheck that it operates smoothly and without interruption.

    Running your test on a new version of your application - You run a test to

    check the behavior of your application. While running, Quick Test connects to

    your application and performs each step in your test.

    Analyzing the test results - You examine the test results to pinpoint defects in

    your application.

    Reporting defects - As you encounter failures in the application when analyzing

    test results, you will create defect reports in Defect Reporting Tool.

    100.Explain the QTP Tool interface. - It contains the following key elements: Titlebar, displaying the name of the currently open test, Menu bar, displaying menus of

    Quick Test commands, File toolbar, containing buttons to assist you in managing

    tests, Test toolbar, containing buttons used while creating and maintaining tests,

    Debug toolbar, containing buttons used while debugging tests. Note: The Debugtoolbar is not displayed when you open Quick Test for the first time. You can

    display the Debug toolbar by choosing View Toolbars Debug. Actiontoolbar, containing buttons and a list of actions, enabling you to view the details

    of an individual action or the entire test flow. Note: The Action toolbar is not

    displayed when you open Quick Test for the first time. You can display the Action

    toolbar by choosing View Toolbars Action. If you insert a reusable orexternal action in a test, the Action toolbar is displayed automatically. Test pane,

    containing two tabs to view your test-the Tree View and the Expert View ,Test

    Details pane, containing the Active Screen. Data Table, containing two tabs,Global and Action, to assist you in parameterizing your test. Debug Viewer pane,

    containing three tabs to assist you in debugging your test-Watch Expressions,

    Variables, and Command. (The Debug Viewer pane can be opened only when atest run pauses at a breakpoint.) Status bar, displaying the status of the test

    101.How does QTP recognize Objects in AUT? - Quick Test stores the definitions

    for application objects in a file called the Object Repository. As you record your

    test, Quick Test will add an entry for each item you interact with. Each ObjectRepository entry will be identified by a logical name (determined automatically

    by Quick Test), and will contain a set of properties (type, name, etc) that uniquely

  • 8/14/2019 T Automation Questions

    7/23

    identify each object. Each line in the Quick Test 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 setmethod). The references to objects in the script will all be identified by the logical

    name, rather than any physical, descriptive properties.

    102.What are the types of Object Repositories in QTP? - Quick Test has two typesof 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 asnecessary for each new test. The object repository per-action mode is the default

    setting. In this mode, Quick Test 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 valuesin 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 objects property values in one action, you may need to make the same

    change in every action (and any test) containing the object.103.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 afterrecording is completed using Active screen (Note : To perform the second one

    The Active screen must be enabled while recording).

    104.What is Parameterize Tests? - When you test your application, you may want to

    check how it performs the same operations with multiple sets of data. Forexample, 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: eachtime the test runs, it uses a different set of data.

    105.What is test object model in QTP? - The test object model is a large set of

    object types or classes that Quick Test uses to represent the objects in yourapplication. Each test object class has a list of properties that can uniquely

    identify objects of that class and a set of relevant methods that Quick Test can

    record for it. A test object is an object that Quick Test creates in the test orcomponent to represent the actual object in your application. Quick Test stores

    information about the object that will help it identify and check the object during

    the run session.

    106.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. Youcan check an entire object or any area within an object. Quick Test 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 orcomponent 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

  • 8/14/2019 T Automation Questions

    8/23

    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 asoperating system, screen resolution, and color settings.

    107.How many ways we can parameterize data in QTP? - There are four types of

    parameters: Test, action or component parameters enable you to use values passedfrom 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, Quick Test uses adifferent 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 Quick Test generates for you based on

    conditions and options you choose. Random number parameters enable you toinsert 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

    Quick Test generate a random number and insert it in a number of tickets edit

    field.108.How do u do batch testing in WR & is it possible to do in QTP, if so explain?- Batch Testing in WR is nothing but running the whole test set by selecting RunTest set from the Execution Grid. The same is possible with QTP also. If our test

    cases are automated then by selecting Run Test set 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.109.What is the file extension of the code file & object repository file in QTP? -

    Code file extension is.vbs and object repository is.tsr

    110.Explain the concept of object repository & how QTP recognizes 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 inthe 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 theunique description. If no assistive properties are available, then it adds a special

    Ordinal identifier such as objects location on the page or in the source code.

    111.What are the properties you would use for identifying a browser & page

    when using descriptive programming? - Name would be another property apartfrom title that we can use.

    112.Give me an example where you have used a COM interface in your QTP

    project? - com interface appears in the scenario of front end and back end. foreg:if you r using oracle as back end and front end as VB or any language then for

    better compatibility we will go for an interface. of which COM will be one among

    those interfaces. Create object creates handle to the instance of the specifiedobject so that we program can use the methods on the specified object. It is used

    for implementing Automation(as defined by Microsoft).

    113.Explain in brief about the QTP Automation Object Model. - Essentially all

    configuration and run functionality provided via the Quick Test interface is in

  • 8/14/2019 T Automation Questions

    9/23

    some way represented in the Quick Test automation object model via objects,

    methods, and properties. Although a one-on-one comparison cannot always be

    made, most dialog boxes in Quick Test 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 Quick Test automation object model, along with

    standard programming elements such as loops and conditional statements to

    design your program.

    114.What is the difference between set_window and win_activate()?

    a. set_window();

    b. it means focus on a particular window and win runner is

    c. waitng some time to find that window when in recording moded. ex:set_window("login",6);

    e. win_activate();

    f. it means to open a particular window,like invoke_application

    g. ();h. ex:win_activate("login");

    115. What is the difference between Set_window() and _set_window()?

    a. Set_window receives windows logical name whereas

    b. _set_window receives the physical description

    116.Explain the check points in QTP? - A checkpoint verifies that expected

    information is displayed in an Application while the test is running. You can addeight types of checkpoints to your test for standard web objects using QTP. A page

    checkpoint checks the characteristics of an Application. A text checkpoint checks

    that a text string is displayed in the appropriate place on an Application. An objectcheckpoint (Standard) checks the values of an object on an Application. An image

    checkpoint checks the values of an image on an Application. A table checkpoint

    checks information within a table on a Application. An Accessibilityy checkpointchecks 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 accessedby your web site

    117.What is test object model in QTP? - The test object model is a large set of

    object types or classes that Quick Test uses to represent the objects in your

    application. Each test object class has a list of properties that can uniquelyidentify objects of that class and a set of relevant methods that Quick Test can

    record for it. A test object is an object that Quick Test creates in the test or

    component to represent the actual object in your application. Quick Test storesinformation about the object that will help it identify and check the object during

    the run session.

    118.How many ways we can parameterize data in QTP? - There are four types ofparameters: 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, Quick Test uses a

  • 8/14/2019 T Automation Questions

    10/23

    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 Quick Test generates for you based onconditions 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 haveQuick Test generate a random number and insert it in a number of tickets edit

    field.

    119.How do u do batch testing in WR & 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

    Test set from the Execution Grid. The same is possible with QTP also. If our test

    cases are automated then by selecting Run Test set all the test scripts can be

    executed. In this process the Scripts get executed one by one by keeping all theremaining scripts in Waiting mode.

    120.If I give some thousand tests to execute in 2 days what do u do? - Adhoc

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

    working fine.121.What is the file extension of the code file & object repository file in QTP? -

    Code file extension is.vbs and object repository is.tsr122.Explain the concept of object repository & how QTP recognizes 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 inthe 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 theunique description. If no assistive properties are available, then it adds a special

    Ordinal identifier such as objects location on the page or in the source code.

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

    124.Give me an example where you have used a COM interface in your QTP

    project? - com interface appears in the scenario of front end and back end. for

    eg:if you r using oracle as back end and front end as VB or any language then for

    better compatibility we will go for an interface. of which COM will be one among

    those interfaces. Create object creates handle to the instance of the specifiedobject so that we program can use the methods on the specified object. It is used

    for implementing Automation(as defined by Microsoft).

    125.Explain in brief about the QTP Automation Object Model. - Essentially allconfiguration and run functionality provided via the Quick Test interface is in

    some way represented in the Quick Test automation object model via objects,

    methods, and properties. Although a one-on-one comparison cannot always bemade, most dialog boxes in Quick Test 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

  • 8/14/2019 T Automation Questions

    11/23

    properties exposed by the Quick Test automation object model, along with

    standard programming elements such as loops and conditional statements to

    design your program.126. How many types of actions are there in QTP?

    QTP supports three types of actions.

    a. Non re-usable actions

    b. Re usable actionsc. External actions.

    127.How do you data drive an external spread sheet?Import from external spread sheet file by selecting import then from file. Which

    imports a tabbed text file or a single sheet from an existing Microsoft excel file into the table. The sheets you import replace all data in a currently selected sheet.

    128. I want to open a notepad window without recording a test and I do not want

    to use system util. run command as well how do I do this?

    Another alternative to open a notepad is to use shell object. Check out with thefollowing example.

    Dim aset a = wscript.create object (wscript.shell)

    a.run notepad.exe.

    129.How many types of recording modes in QTP? Describe each type with an

    example

    where we use them?

    Three types of recording modes in QTP.

    1) NORMAL2) ANALOG MODE

    3) LOW LEVEL RECORDING MODE.130.How can we do the frame work in QTP?Depending upon the project and client requirements.

    131.Testing > QTP which features of QTP would you like improve? How wouldyou go about implementing it?

    We are not implementing any concept in QTP.

    132.Explain how would you design the driver code for a keyboard based testscript?

    Test script prepare in QTP.Keywords prepare in a excel sheet and objects description prepare in a notepad.

    133.What is the file extension of shared object repository?

    The shared object repository is .tsr extension.134. How to handle java tree in QTP?

    First of all we need to handle a java add- in to handle a java tree. In tools we have

    the object identification drop down list. There we have the java option torecognize the objects there select the tree option. Add the properties.

    135.How to fetch test data from data base by using QTP?In order to fetch test data from dat base we have to create a Adodb connectionobject to connect with data base. The syntax is create object (Adodb.connectin).

  • 8/14/2019 T Automation Questions

    12/23

    136.What is the procedure to test flash application using QTP?Using multimedia add- in support.

    137.If a error aoccur during the execution of QTP scropt? How can we handle

    it?

    Using recovery scenario manager.

    138.How to merge the object repository files?Using a repository merge tool. It is available with QT Plus Tool.

    139.Can we update the data base through QTP?Yes. We can.

    140.How many tabs are available to view your test in a test pane and what are

    they?

    Two. These are tree and expert.

    141.What are the three main stages involved in testing with QTP?Creating test , running tests , analyzing test.

    142.Write a function to capture the pop-ups?

    Here I am writing steps handle pop-up exceptions.

    1) select the recovery scenario manager 2) press the new scenario

    3) click next4) select the pop up exceptions

    5) select the pop window which we want to handle (capture) by clicking the spy

    button.

    6) press next7) select the specified options like key board or mouse operations press next

    select the specified options click default or press enter

    9) click next and uncheck add another recovery operation10) click next and select proceed next step

    11) click next and give the scenario name and description

    12) click next and select add scenario to current test and add scenario to defaultsettings. Click finish after word save that scenario.

    143.What is meant by hot keys?A hot keys or a combination of keys on a computer board when pressed performsa task. The specific task performed by a particular hot key where is by operating

    system or application. However , there are commonly _ used hot keys.

    144.For a triangle (sum of two sides is greater than or equal to third side ), what

    is the minimal number of test cases required?

    Generally, we will calculate the number of test cases that depends on the

    particular module and its complexity. Minimum number of test = ( number of

    outputs) multiply (1.6) ( approx calculation)145.What are the flaws in water fall module and how overcome it?

    Science testing comes at last stage , there are huge chances of defect

    multiplication, defects will be migrated to every stage wastage of humanrecourses and time delays are also introduced.

    146.How do you test the web link which is changing dynamically?This could be tested through the automated test tools like Rational Robot and Win

    Runner .

  • 8/14/2019 T Automation Questions

    13/23

    147.What is system testing? And what are the different types of tests youperform in system testing?

    System testing is a type of block box testing means testing the application. Afterthe integration testing, usually will do testing. Functionality, regression and

    performance test comes under this.

    148.How do we know about the build we are going to test? Where do you seethis?In the test plan we are going to have all details about who should test which test in

    a team which is given by team leader. According to that the entire group will dotheir testing.

    149.What did you do as a team leader?The roles of a leader,

    1) before the project gets started, will conduct one team meeting and discuss briefly about the upcoming project.

    2) will distribute the work among the team members and let them know which

    part of application they are going to test.

    150.What test you perform mostly? Regression or Retesting in your testingprocess?Retesting is a repeated execution of the test case which results in a fault, with theaim that fault occurred, Regression testing is the renewed testing of already tested

    program or part of that modification with the aim that the modified had.

    151.With out using GUI map editor can we recognize the application in win

    runner?

    With out using GUI map editor, we can recognize the application objects using a

    descriptive programming.

    152.To which environments does a QTP support?QTP supports functional testing of all enterprise environments, including

    Windows, Web, .Net, Java, j2EE, SAP, Sieble, Oracle, Peoplesoft, Visual Basic,

    ActiveX, Mainframe terminal emulators and Web services.153.In how many ways we can add checkpoints to an application using QTP?

    We can add check points while recording the application or we add after recording

    is completed using Active Screen (NOTE: to perform the second one the activescreen must be enable while recording).

    154.How does QTP identifies the object in the application?QTP identifies the object in the application by logical name and class. For ex. the

    Edit box is identified byLogical Name:PSOPTIONS_TIME20

    Class:Web Edit

    155.If an application name changes frequently that is while recording it has

    name Window1 and then while running its Window2, in this case how

    does QTP handles?

    QTP handle those situations by Regular Expressions.156.What is parameterizing tests?

    When you test application, you may want to check how it performs the same

    operations with multiple set of data. For ex: suppose you want to check hoe your

    application responds to ten separate tests of data. You could record ten separate

  • 8/14/2019 T Automation Questions

    14/23

    tests, each with its own set of data. Alternatively you can create a parameterized

    test that runs ten times: each time the test run, it uses a different set of data.

    157.What is test object model in QTP?The object model is a large set of obkject types or classess that quick test uses to

    represent the objects in your applications. Each test object lcass has a list of

    properties that can uniquely identifiy objects of that class and a set of relevantmethods that quick test can record for it .

    A test object is an object that quick test creates in the test or component to

    represent the actual object in your application. Quick Test stores informationabout the object that will help it identify and checks the object during the run

    session. A run time object is the actual object in your websites or in the

    application on which methods are performed during the run session.

    When you perform an operation on your application while you recording.

    Identifies the quick test test object class that represents the objects on which you

    performed the operation and creates the appropriate the test objects.

    Reads the current value of the object properties in your application and stores the

    list of properties and values with the test object.

    Choose a unique name for the object generally using the values of one of itsprominent properties.

    Records the operation that you performed on the object using the appropriate

    quick test test object method.

    For Example, Suppose you click on a Find button with the following HTML

    source code:

    INPUT TYPE= SubmitNAME=Find VALUE=Find>

    Then quick test identified the objects that you clicks as a web button test object

    It creates a web button object with the name find, and records the following

    properties and values for the find web button:

    It also records that you performed a click method on the Web button.

    Quick test displays your s step in the keyboard view like this:

    Quick Test displays your step in the expert view like this:

    Browser(Mercury Interactive) . Page( Mercury Interactive).Web

    button(Find).Click

  • 8/14/2019 T Automation Questions

    15/23

    158.What is the difference between image check point and bitmap checkpoint?Image check points enable due to check the properties of web page. You can

    check an area of a web page or application as a bitmap.While creating a test of 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.

    Quick Test captures the specified object as a bitmap, and inserts a checkpoint inthe test or component.

    You can also use to save the selected area of the object with your test or

    component in order to save disk space for example, suppose you have a websitethat can display a map of a city the user specify that map has control keys for

    zooming.

    You can record the new map i.e displayed after one check on the control key that

    zooms in the map. Using the bitmap checkpoint, you can check that the mapzooms in correctly.

    You can create bitmap checkpoint, all supported testing environments (as long as

    the appropriate add-ins are loaded)

    Note: The result of bitmap check point may be effected by factors such as OS,Screen Resolutions and color settings.

    159.How do you do Batch testing Winrunner and is it possible to do in QTP? IfSo, Explain?

    Batch testing in Winrunner is nothing but running the whole test set by selecting

    Run Test Set from the Execution Grid. The same is possible with QTP also. If

    our test cases are automated then by selecting Run test Set all the test scripts

    can be executed.With this process the scripts get executed one by one keeping all the remaining

    scripts in Waiting Mode.160.If I give some 1000 tests to execute in 2days what do you do?Adhoc Testing is done. It covers the least basic functionalities to verify that the

    system is working fine.

    161.What does it mean when a checkpoint is in red color? What do you do?Red color indicates failure. Here we analyze the cause for the failure whether it is

    a script issue or environmental issue or a application issue.

    162.What do you call the Window Testing Director test lab?

    Execution grid it is placed from where we run all the manual/automated scripts.163.How do you create new test sets in test director?

    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 Control N Icon to create a test set.164.How to import data from a .XLS file to data table during run time?

    Data table .Import XLS filename

    Datatable .Import sheet (FileName, SheetSource, SheetDest)Datatable>Importsheet C:\name.Xls, 1, name

  • 8/14/2019 T Automation Questions

    16/23

    165.How to export data present in Database to an .XLS file?Datatable .Export xls filename

    166.Syntax for how to call one script from another? and syntax to call one action

    in another?

    167.Run Action Action Name,[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 rnfinteration.

    Enter the row range (i.e 1.7): or enter rngAll to run iterations on all rows.If the actions called by the RunAction statement includes an ExitAction

    statement, the Run Action

    Statement can return the value of the ExitActions Ret Val arguement.

    168.How to export QTP results to an .xls file?By default it creates an XML file and displays the results.

    169.What are the Differences between QTP and Winrunner?

    QTP is Object based scripting (VB) where as WR is TSL ( C based language)

    Scripting.QTP supports .Net application automation not available in WR

    QTP has Active Screen support which captures the application not available inWR.

    QTP has Data Table to store script values, variables which WR does not have.

    Using a point and click capability you can easily interface with objects, their.

    Definitions and create checkpoints after having record script without having.To navigate back to that location in your application like you have to with

    WinRunner.

    This greatly speeds up script development.170.How to add a Run-time parameter data sheet?

    Datatable.localsheet

    The following example, uses the Local Sheet property to return the Local Sheet of

    the run time data table in order to add a parameter(column) to it.My parameter = DataTable. LocalSheet.AddParameter(Time, 5.45)

    171. What scripting language is used in QTP?VB scripting

    172.Analyzing the Checkpoint results

    Standard Checkpoint: By adding standard checkpoints to your checks or

    components, you can compare the expected values of objects properties to the

    objects current values during the run session, if the results doesnt match thecheck point fails.

    173.How to create a Run-time property for an object? Table and DataBase(DB)

    checkpoints

    By adding Table checkpoints to your tests or components we can check that a

    specified value is displayed in a cell in a table on your application. By adding DB

    checkpoints to your tests or components you can check the contents of databaseaccessed by your application. The Results displayed for table and database

  • 8/14/2019 T Automation Questions

    17/23

    checkpoints are similar. When you run tests or components QTP compares the

    expected results of the checkpoints 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 objects. To adda table checkpoint you use the checkpoint properties of dialog box. Table

    checkpoints are supports for web and ActiveX applications as well as for variety

    of External Add-in environments.You can use Database checkpoints in your tests or components to check databases

    accessed by your websites or application and to delete 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 environmentssupported by QTP by default as well as for 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 custominstallation of Microsoft office.

    b. Manually define an Sql statement.The checkpoints time out option is available only when creating a table

    checkpoint.

    That is not available when creating database checkpoints.

    174.Checking Bitmaps.You can check an area of a web page or application as bitmap. While creating a

    test or a components you specify the area you want to check by selecting an

    object. You can check an entire object or any area with in an object. QTP capturesthe specified object as bit map 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 QTP compares the object or selected area of

    the object currently displayed of the web page or the application with the bitmap

    stored when the test or component was recorded. If there are any differences QTPcaptures 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 the test results of a checkpoint, seeviewing checkpoint results.

    For example, suppose you have a website that can display a map of a city the user

    specify that map has control keys for zooming.You can record the new map i.e displayed after one check 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 checkpoint, all supported testing environments (as long as

    the appropriate add-ins are loaded)

  • 8/14/2019 T Automation Questions

    18/23

    Note: The result of bitmap check point may be effected by factors such as OS,

    Screen Resolutions and color settings.

    175.Text/Text area checkpointIn the Text/Text area checkpoint propertied 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 wayduring the run session

    Note: In windows based environment. If there is more than one line of text

    selected, the checkpoint summary pane display (complex value ) instead of theselected text for the checkpoint.

    QTP 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 the parts of the captured string as checked text and other parts as text before and text after, click configure button.The configure text selection dialog box opens.

    Checking XML : XML (Extensible Markup language)is a Meta-Markup language

    for test documents i.e endorsed as a standard by the WC3.XML makes thecomplex data structure portable between different computer environments or

    operating systems and programming languages, facilitating the sharing of data.

    XML files contain text with simple tags that describe the data within an XMLdocuments these describe the data content, but not the presentation of the data.

    Application that display and XML documents or file use either cascading style

    sheets of the XSL formatting objects(XSL-FO) to present the data.

    You can verify the data content of XML files by inserting XML checkpoints. Afew common uses of XML checkpoints are described below

    An XML file can be a static data file i.e accessed in order to retrieve commonly

    used data for which a quick response time is needed. For example, country names,zip codes or area codes although this data can be changes over time it is normally

    quite static.

    You can use an XML checkpoint to validate that the data has not changed fromone application released to another.

    An XML file can consists of elements with attributes and values(character data).

    There is parent and child relationship between the elements, and elements canhave attributes associated with them. If any part of the structure(including data)

    changes the applications ability to process the XML file may be effected. Using

    an XML checkpoint you can check the content of an element to make sure that its,

    attributes, and values have not changed.XML files are often an intermediary that retrieves dynamically changing data

    from 1 system.

    The data is then accessed by another system using document typedefinitions(DTD) enabling the accessing system to read and display the

    information in the file. You can use an xml checkpoint and parameterize the

  • 8/14/2019 T Automation Questions

    19/23

    captured data values in order to check an xml document or file whose data

    changes in a predictable way.

    XML documents and files often needed a well defined structure in order to beportable across platforms and development systems. One way to accomplish

    elements this is by developing and XML scheme which describes the structure of

    XML elements and data types. You can use scheme validation to check that eachitem of content in an xml file adheres to the scheme description of the elements in

    which the content is to be placed.

    176.Object Repository types, which and when to use?Deciding which object repository mode to choose the default object repository

    mode and 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 rcreating simple recored 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 expert to frequently modify test object properties. You generally createsingle action tests conversely, the shared object repository mode is generally the

    preferred mode when you have several test that test elements of the sameapplication, interface or set of objects.

    you expert the object properties in your application to change from time to time

    and / or you regularly need to up date or modify test object properties.

    You often work with multi action tests and regularly use insert copy of action andinsert called to action options.

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

    178.How to execute a WR script in QTP?a)TSL tset.run test, test path, test set.[parameters]>used in QTP 6.0 for backward

    compatibility.

    Parameters:the test set with in quality center, in which test runs are stored. Notethat this argument is relevant only when working with a test in a quality center

    project.When the test is not saved in a quality center, this parameter is ignored. Ex

    . TSL test.run test D:\Tset1

    B) TSL test.runtestex testpsth,run minimize, close app [parameter] TSLtest.runtestex C:\Win Runner/Tests/Basic_Flight,True,False,My Value.

    Close App:indicates whether to close the WR application when the WR tset run

    ends.Parameter: up to 15 WR function argument.

    179.How to handle time errors?On Error Resume next:causes execution to continue with the statementimmediately following the statement that causes the run time error, or with the

    statement immediately following tie most recent call out of the procedure

    containing the on error resumes next statement.

    This allows execution to continue despite a run time error. you can then build the

  • 8/14/2019 T Automation Questions

    20/23

    error handling routine inline with in the procedure using Err object MSG box

    error no: &Err.no&.&Err.description &Err.source&Err.help context.

    180.How to change the run time value of property for an object?Set to property changes the property values used to identify an object during the

    test run. Only properties that are included in the test object description can be set.

    181.How to retrieve the property of an object?Using GETRO property.

    182.How to open any application during scripting?Systemutil, object used to open and close applications and processes during a runsession. 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. Ex. sytemutil.run notepad.exe

    systemutil.close descendant processes (closes all the processes open by QTP ).183.Types of properties that QTP learns while recording?

    Mandatory and assistive. In addition to recording the mandatory and assistive

    properties specified in the object identification dialog box, QTP can also record a

    backup ordinal identifier for each test object. The ordinal identifier assigns theobject in numerical value that indicates its order relative to other objects with an

    otherwise identical description (objects that have the same vales foe all propertiesspecified in the mandatory and assistive property list). This ordered value enable

    QTP to create a unique description when the mandatory and assistive properties

    are not sufficient to do so.

    184.What is the extension of script and object repository files?Object repository: .TSR, script: .MTS, Excel: default.ELS

    185.How to suppress warning from the test result page?

    From the test result viewer tools > filters > warnings must be unchecked.186.When we try to use test run option run from step, the browser is not

    launching automatically? Why?

    This is default behavior.187.Does QTP is unicode compatible?

    QTP 6.5 is not but QTP 8.0 is expected to be Unicode compatible by end of Dec

    2004.188.How to turn off QTP results after running a script?

    Go to tools > option > run tab and deselect view results when run session ends.

    But this suppresses only the result window, but a log will be created and can

    viewed manually which can not be restricted from getting created.189.How to verify the cursor focus of a certain field?

    Use focus property of GETRO property method

    190.Any limitation to XML check points ?Mercury has determined that 1.4mb is the maximum size of XML file that QTP

    6.5 can handle.

    191.How to make arguments optional in a function?This is not possible as default VBS does not support this. Instead you can pass a

    blank scoring and have a default value if arguments are not required.

    192. How to convert a sting to an integer?

    CInt ()> a conversion function available.

  • 8/14/2019 T Automation Questions

    21/23

    193.Inserting a call to action is not importing all columns in data table of globalsheet. Why?

    Inserting a call to action will only import the columns of the action called.194.How you do batch testing in WR & 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

    Test set from the Execution Grid. The same is possible with QTP also. If our testcases are automated then by selecting Run Test set 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.195.What does it mean when a check point is in red color? what do u do?

    A red color indicates failure. Here we analyze the cause for failure whether it is a

    Script Issue or Environment Issue or a Application issue.196.What is the file extension of the code file & object repository file in QTP?

    Code file extension is.vbs and object repository is.tsr

    197.Explain the concept of object repository & how QTP recognizes 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 youselected). 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 defaultproperty 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

    Ordinal identifier such as objects location on the page or in the source code.198.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.199.Give me an example where you have used a COM interface in your QTP

    project?

    com interface appears in the scenario of front end and back end. for eg:if you rusing oracle as back end and front end as VB or any language then for better

    compatibility we will go for an interface. of which COM will be one among those

    interfaces. Create object creates handle to the instance of the specified object sothat we program can use the methods on the specified object. It is used for

    implementing Automation(as defined by Microsoft).

    200.Explain in brief about the QTP Automation Object Model.

    Essentially all configuration and run functionality provided via the Quick Testinterface is in some way represented in the Quick Test automation object model

    via objects, methods, and properties. Although a one-on-one comparison cannot

    always be made, most dialog boxes in Quick Test have a correspondingautomation 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 Quick Test automation object model,

    along with standard programming elements such as loops and conditional

    statements to design your program.

  • 8/14/2019 T Automation Questions

    22/23

    201.What is FSO?

    FSO stands for File System Object. This is used to support text file creation and

    manipulation through the TextStream object and is contained in the Scriptingtype library (Scrrun.dll)

    The FSO Object Model has a rich set of properties, methods and events to process

    folders and files.How to create a file?We first create a FSO object using CreateObject and then create a text file using

    CreateTextFile.For Example: Suppose you want to create a file called "test.txt" located in C:

    202.Dim fso, file, file_location

    file_location = "C:\file_location"

    Set fso = CreateObject(Scripting.FileSystemObject)Set file = fso.CreateTextFile(file_location, True) // True--> file is to be

    overwritten if it already exists else false

    203.We would use the same example for the rest of this post.

    How to open a file?204.Set file= fso.OpenTextFile("C:\file_location", ForWriting, True)

    //2nd argument can be ForReading, ForWriting, ForAppending//3rd argument is "True" if new file has to be created if the specified file doesnt

    exist else false, blank signify false.

    205.How to read content from a file?

    Use ReadLine() methodFor example:

    206.Set file= fso.OpenTextFile("C:\file_location", ForReading, True) //2nd argument

    should always be "ForReading" in order to read contents from a fileDo while file.AtEndofStream True

    data = file.ReadLine()

    msgbox dataLoop

    207.How to write content to a file?You can use Write() or WriteLine() Methods to write text into a file. Thedifference between the Write() and WriteLine() Method is that the latter

    automatically inserts a new line character while the former doesnt insert a new

    line character.

    For example:208.Set file= fso.OpenTextFile("C:\file_location", ForWriting, True) //2nd argument

    should always be "ForWriting" in order to write contents to a file

    file.Write("This is a place to get all your qtp")file.Write("questions and answers solved.")

    //Output will be:

    This is a place to get all your qtp questions and answers solved.whilefile.WriteLine("This is a place to get all your qtp")

    file.Write("questions and answers solved.")

    //Output will be:

  • 8/14/2019 T Automation Questions

    23/23

    This is a place to get all your qtp

    questions and answers solved.

    209.How to delete content?Use DeleteFile() method to delete a file from a particular location

    Foe Example:

    210.file_location = "C:\file_location"Set fso = CreateObject(Scripting.FileSystemObject)

    fso.DeleteFile(file_location)