Showing posts with label QTP. Show all posts
Showing posts with label QTP. Show all posts

What are Test Objects?

Objects that are used in the recording and their properties are stored in the Object Repository. These stored objects are called test objects. The test objects represent objects of the application in the test. During a test run, QuickTest uses these test objects
to identify objects in the application.

You can delete objects from the Object Repository. You can add or remove properties of an object and change the values of those properties.

image

Test objects can be stored in two types of object repositories: shared and local. By default, the test objects are stored in the local object repository. These test objects are associated with a specific action and no other action can access these objects.

  • You can choose to store your objects in the shared object repository, which can be accessed by multiple tests.
  • Test objects are different from Run-time objects.You can all these properties in Object Spy.

What is Object Spy? How to use it?

The Object Spy feature enables you to view the properties and their current values as
well as methods associated with an object. Object Spy also enables you to view the
syntax for a selected method.

image

Navigation:

  1. On the QuickTest Professional toolbar, click OBJECT SPY.
  2. Select TOOLS → OBJECT SPY.

To view the run-time properties of an object using the Object Spy:

1. On the QuickTest Professional toolbar, click OBJECT SPY. The OBJECT SPY dialog
box appears.
Note: Alternatively, select TOOLS → OBJECT SPY.
2. In the OBJECT SPY dialog box, click the pointing hand button.
3. With the pointing hand, click on the desired object in the AUT.
4. In the OBJECT SPY dialog box, click the PROPERTIES tab to view the properties of
the selected object.

Imp Note:

  • Test object properties of the actual object are available for all types of objects. This is what you always see in the
    Object Repository. The list shows values when the object was learned.
  • Run-time properties are available for Web, ActiveX, .Net, and Java objects. These may be different from the test
    object properties because object properties change during run-time.

Testing Interview Questions at Sapient,Bangalore

Some of the questions asked for 2+ guy for QA position at Sapient,A CMM Level company.Total 5 rounds at the company including 3 Technical on manual and automation testing and 2 HR rounds.

1. What will happen if i select all the add-ins in QTP at a time?

Answer: Select only the add-ins that you need for the current test. Selecting all available add-ins can cause QuickTest
Professional internal inconsistencies which may lead to test failures.

2. What are the default and optional add-ins available in QTP?

Answer:

Default:ActiveX,Visual Basic and Web

Optional: The optional add-ins include Java, .NET, Oracle, PeopleSoft, SAP, Siebel, Terminal Emulator, Visual Age Smalltalk
and Web Services.

3. Differences between Global and Action sheets in Data table?

Answer: Simple difference here b/w these two is:

Global Sheet:Can be accessible for all the actions in the entire Test.

Action Sheet: Will be accessible only for that action.Other actions can’t use data in this action sheet.

4. What is Active Screen?

5. Why we need Automation testing?

6. Diff b/w QTP & Win Runner?

7. In how many ways you can insert check points.

Answer: We can insert check points in 4 ways: Through Insert menu,Right click in Keyword View,Right click in Expert view,Right click in Active screen.

8. General Elements/Options in a bug report?

9. What test plan should contain?

10. Diff b/w Test Plan and Test Strategy?

Hope this help you some way! Don't forget subscribe to get daily interview questions by mail.

QTP Interview at ProKarma,Hyderabad

Hello Guys,

Here are some of the questions asked at ProKarma company,Hyderabad.The post was for a 2+exp guy with atleast 1 year QTP experience.

Questions:
  1. Tell me about your self?
  2. What framework you use in your project?
  3. How do you connect QTP with Database?
  4. How do you connect QC & QTP?
  5. Rate yourself in VB Scripting from 1 to 5 ?
  6. How often you do descriptive programming in your project?
  7. Most difficult bug you found in your project?
  8. If i give you a project and ask to start from today.And you will be only the person in project.How would you start the day?
  9. In how many ways you can play with Synchronization point in your script?
  10. Can you write a script to fill the username and password fields in an application?
  11. What is the Object Repository maximum size?
  12. Why do we need descriptive programming?though we have record and playback.
  13. Why you are looking for a change?
Well these are questions i gathered from the person who attended this interview.He said interviewer was very cool and asked simple questions.He concentrated more on Descriptive programming with VB Script.

Hope you enjoyed! And useful for you!

Don't miss any article:Get it by E-mail

What are Step Into,Step Over and Step Out in QTP?

STEP INTO: Runs the current step of the active test. If the current line calls another
action, the called action is displayed. The test pauses at the first line of the called
action.


STEP OVER: Runs the current step in the active test. When the current step calls
another action, the called action is executed but not displayed.


STEP OUT: Runs the current step until the end of the function, returns to the calling
component or function library, and then pauses the run session.


Don't miss any article:Get it by E-mail

Benefits of Automated Testing

Automated testing enables you to optimize software quality, accelerate the testing
process, and increase the testing efficiency.

Automated testing offers the following advantages that are not offered by manual
testing:
  1. Reusability: The tests that you automate can be reused during different phases ofthe testing process.
  2. Consistency: Automated tests provide the same test results every time. Therefore,you use automated tests for regression testing.
  3. Productivity: Automated testing enables you to run tests unattended. Therefore,human resources that are otherwise involved in the testing process can be used for accomplishing other tasks and the overall testing productivity of your organization increases.
Don't miss any article:Get it by E-mail

QTP Step Generator Functions

QTP Step Generator Functions:GetROProperty,GetTextLocation,GetTOProperties,GetTOProperty,SetTOProperty

These are most important and confusing to everyone.so here am sharing you in easy way with syntax and examples too.

GetTOProperties:Returns properties and values which QTP has recorded and will use to identify an object at run time

Syntax: set a=Window("Flight Reservation").WinRadioButton("Business").GetTOProperties

GetTOProperty:It will Return the value of a particular property for a test object which QTP recorded to identify an object during Run time. The value is taken from the Object Repository.

Syntax: set a=Window("Flight Reservation").WinRadioButton("Business").GetTOProperty

GetROProperty: It will Return the current value (run time value) of the test object property from the object in the application.GetROProperty retrieves the current property value of the object in the application during the test run.

Syntax: set a=Window("Flight Reservation").WinRadioButton("Business").GetROProperty

Detailed explanation with example is there here.

SetTOProperty: Sets the value of the specified property in its test object description.It helps to Modify Test Object Properties During a Run Session.

You can modify the properties of the temporary version of the object during the run session without affecting the permanent values in the object repository by adding a SetTOProperty statement in the Expert View.

Syntax:Object(description).SetTOProperty Property, Value

GetTextLocation: Checks whether the specified text string is contained in the specified window area.

Syntax:object.GetTextLocation (TextToFind, Left, Top, Right, Bottom, [MatchWholeWordOnly])

Hope you enjoyed knowing all these.Subscribe to my feeds to get daily updates on testing.

Advertisement:Zoom Into Tech & Blogging tips at TechZoomIn

QTP Certification Sample Q & A’s

1) The new Object Repository Comparison Tool is
accessible from the Object Repository Manager. You can
use this tool to identify the differences between
objects in ........
A) two specified shared object repository files.
B) a Shared and a Local object repository files.
C) either Shared or Local object repository files.
D) two specified Local object repository files.


2) You can use the objects and methods of the
QuickTest .................... to write scripts that
automatically manipulate object repositories, instead of
performing these operations manually using the Object
Repository Manager.
A) Automation object model
B) Object Repository automation object model
C) Object Repository model
D) Object Repository Script Object model


3) You must convert object repository files from
QuickTest Professional 8.2.1 or earlier to the current
format before you can use them in QuickTest Professional
9.0 or later. Which method lets you do so.
A) Conversion method
B) Converge method
C) Convert method
D) None


4) You open the Object Repository window for a
specific component by choosing ..........
A) Resources > Object Repository
B) Tools > Object Repository
C) File > Object Repository
D) Help > Object Repository


5) In QTP 9 or above, Test objects can be stored in
two types of object repositories—........
A) a shared object repository and a Per-Action object
repository.
B) a shared object repository and a local object
repository.
C) a shared object repository and a Action object
repository.
D) Both A & C


6) The Object Repository Manager enables you to open
...... shared object repositories and modify them as
needed
A) multiple
B) three
C) two
D) Seven


7) ........ Method Loads the specified object
repository.
A) Overload
B) Load
C) Both A & B
D) None


8) An object repository that is currently open by
another user is locked, is it possible to merge a locked
object repository.
A) Yes
B) No


9) You can manage the shared object repository
associations of a selected test using the ............
A) Associate Repositories dialog box
B) Object Repositories dialog box
C) Associate Repositories Manager dialog box
D) Object Repositories Manager dialog box


10) All changes you make to an object repository are
automatically updated in all components open on the same
computer that use the object repository as soon as you
make the change—even if you have not yet saved the
object repository with your changes.
A) True
B) False


11) If you want to modify an object stored in a shared
object repository, you can modify it.......
A) using the Object Repository Manager
B) you can modify it locally using the Object Repository
window.
C) Both A & B
D) None of above


12) ................ Returns an ObjectRepositories
collection representing all object repository files
associated with the action.
A) Object Property
B) Automation Object Model
C) ObjectRepositories Property
D) OR PropertyAnswers


Answers:
1) a 2) b 3) c 4) a 5) b 6) a 7) b 8) a 9) a 10) a 11) c 12)c

QTP Interview Questions

  • 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.
  • 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.
  • What is Object Spy in 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.
  • What is the file extension of the code file & object repository file in QTP? - Code file extension is.vbs and object repository is.tsr
  • 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 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 Ordinal identifier such as objects location on the page or in the source code.
  • 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.
  • 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 specified object so that we program can use the methods on the specified object. It is used for implementing Automation(as defined by Microsoft).
  • Explain in brief about the QTP Automation Object Model. - Essentially all configuration 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 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.
  • Save QTP report as a single HTML file

    There are a lot of different solutions for improved reporting in QTP (for example, our very own ReporterManager). However, sometimes, you simple wish to export the entire report into a single HTML file, in order to copy / mail / archive it. Here’s a neat trick that will help you do that:

    Open the registry editor, and go toHKLM->SOFTWARE->Mercury Interactive->QuickTest Professional->Logger->Media->Log
    There’s an item named "Active" under that key. Change it to 1 (it should be 0)

    Now when you run a test (you need to restart QTP after the change), the results folder will include a LOG folder, with the entire log as a single HTML file. It’s a concise report, but it’s quite enough for most uses.

    Like the guide, then subscribe by entering you mail id to get updates daily
    Don't miss any article:Get it by E-mail

    QTP Installation Guide

    Quick Test Professional Installation with screenshots:


    1. Click on the document
    2. Download the document and follow the screenshots to install

    c
    Don't miss any article:Get it by E-mail

    32 Basic QTP Interview Questions

    Before start reading this let me explain what are all covered in this section:
    Here i covered what is QTP,Check Points and limitations,Usage and some more basic and sure interview questions.
    Happy Reading!

    1.Full form of QTP ?
    Quick Test Professional

    2.What’s the QTP ?
    QTP is Mercury Interactive Functional Testing Tool.

    3.Which scripting language used by QTP ?
    QTP uses VB scripting.

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

    5.How many types of recording facility are available in QTP ?
    QTP provides three types of recording methods-

    • Context Recording (Normal)
    • Analog Recording
    • Low Level Recording

    6.How many types of Parameters are available in QTP ?
    QTP provides three types of Parameter-

    • Method Argument
    • Data Driven
    • Dynamic

    7.What’s the QTP testing process ?
    QTP testing process consist of seven steps-

    1. Preparing to recoding
    2. Recording
    3. Enhancing your script
    4. Debugging
    5. Run
    6. Analyze
    7. Report Defects

    8.What’s the Active Screen ?
    It provides the snapshots of your application as it appeared when you performed a certain steps during recording session.

    9.What’s the Test Pane ?
    Test Pane contains Tree View and Expert View tabs.

    10.What’s Data Table ?
    It assists to you about parameterizing the test.

    11.What’s the Test Tree ?
    It provides graphical representation of your operations which you have performed with your application.

    12.Which all environment QTP supports ?
    ERP/ CRMJava/ J2EEVB, .NETMultimedia, XMLWeb Objects, ActiveX controlsSAP, Oracle, Siebel, PeopleSoftWeb Services, Terminal EmulatorIE, NN, AOL

    13.How can you view the Test Tree ?
    The Test Tree is displayed through Tree View tab.

    14.What’s the Expert View ?
    Expert View display the Test Script.

    15.Which keyword used for Nornam Recording ?
    F3

    16.Which keyword used for run the test script ?
    F5

    17.Which keyword used for stop the recording ?
    F4

    18.Which keyword used for Analog Recording ?
    Ctrl+Shift+F4

    19.Which keyword used for Low Level Recording ?
    Ctrl+Shift+F3

    20.Which keyword used for switch between Tree View and Expert View ?
    Ctrl+Tab

    21.What’s the Transaction ?
    You can measure how long it takes to run a section of your test by defining transactions.

    22.Where you can view the results of the checkpoint ?
    You can view the results of the checkpoints in the Test Result Window.

    23.What’s the Standard Checkpoint ?
    Standard Checkpoints checks the property value of an object in your application or web page.

    24.Which environment are supported by Standard Checkpoint ?
    Standard Checkpoint are supported for all add-in environments.

    25.What’s the Image Checkpoint ?
    Image Checkpoint check the value of an image in your application or web page.

    26.Which environments are supported by Image Checkpoint ?
    Image Checkpoint are supported only Web environment.

    27.What’s the Bitmap Checkpoint ?
    Bitmap Checkpoint checks the bitmap images in your web page or application.

    28.Which enviornment are supported by Bitmap Checkpoints ?
    Bitmap checkpoints are supported all add-in environment.

    29.What’s the Table Checkpoints ?
    Table Checkpoint checks the information with in a table.

    30.Which environments are supported by Table Checkpoint ?
    Table Checkpoints are supported only ActiveX environment.

    31.What’s the Text Checkpoint ?
    Text Checkpoint checks that a test string is displayed in the appropriate place in your application or on web page.

    32.Which environment are supported by Test Checkpoint ?
    Text Checkpoint are supported all add-in environments

    Note:

    • QTP records each steps you perform and generates a test tree and test script.
    • QTP records in normal recording mode.
    • If you are creating a test on web object, you can record your test on one browser and run it on another browser.
    • Analog Recording and Low Level Recording require more disk sapce than normal recording mode.

    These are the basic question you need to know before attending interview and we have some more advanced interview question on QTP Here>>

    Don't miss any article:Get it by E-mail

    QTP interview questions

    1.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. Quick Test 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 standard Windows applications, Visual Basic 6 applications and.NET framework applications .

    2.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 a change in your site, such as clicking a link or image, or entering data in a form.
    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 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. 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. 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 to check 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.

    3.What are the Features & 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.

    4.How to handle the exceptions using recovery scenario manager in QTP?
    There are 4 trigger events during which a recovery scenario should be activated. A pop up window appears in an opened application during the test run: A property of an object changes its state or value, A step in the test does not run successfully, An open application fails during the test run, These triggers are considered as exceptions.You can instruct QTP to recover unexpected events or errors that occurred 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
    5.What is the use of Text output value in QTP?
    Output values enable to view the values that the application talks during run time. When parameterized, 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.

    6.How to use the Object spy in 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) True Object repository Dialog, In Object repository 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 minimized then, hold the Ctrl button and activate the required window to and release the Ctrl button.

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

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

    9.Explain about the Test Fusion Report of QTP?
    Once a tester has run a test, a Test Fusion 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 Test Fusion reports with Quick Test Professional, you can share reports across an entire QA and development team.

    10.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, mainframe terminal emulators, and Web services.

    QTP Videos here>>
    Don't miss any article:Get it by E-mail

    Automated Testing Using Quick Test Professional

    QTP Video:
    A wonderful video explaining basic level usage of QTP with examples
    Happy Learning:
    Don't miss any article:Get it by E-mail