Tuesday, October 4, 2011

QTP Interview Questions:QTP

Hi Friends the few are some questions which are related to QTP interview ,which may be useful.

QTP Interview Questions -1

1) What are the advantages in Test Automation?

a)  Fast: Test Tool runs tests significantly faster than human users.

b) Reliable: Automation tool can perform the same operation each time, if we repeated multiple times, so that we can eliminate human errors.

c)  Repeatable: We can check how application or website reacts after repeated the same operation with multiple times.

d) Reusable: Automation scripts are reusable on different version of the application of websites even if the user interfaces changes.

e)  Comprehensive: In automation testing we can build a suit of tests that covers every feature in the application or website.

f)  Programmable: We can program sophisticated Tests that bring out hidden information from the application

2) What are the drawbacks in Test Automation?
a) It is expensive
b) We cannot automate all areas.
c) Lack of Skill
d) It has some limitations (It cannot test every thing)

3) What type of test tools available in the industry?

We can segregate Test tools in 2 categories

a) Business Classification

     1) Vendor Tools
     2) Open Source Tools
     3) In-house Tools


b) Technical Classification
    
     1) Functional and Regression Test Tools
     2) Load/Stress/Performance Test Tools
     3) Security Test Tools
     5) Test Management Tools
     6) Unit Test Tools
     7) Requirement Management Tools Etc...


4) What are the important factors in test tool selection?

a. Technical factors:

i. Nature of the AUT (Application Under Test)
ii. Tool Features (Facilities available)
iii. Availability of Skilled professionals
iv. Organizations experience
v. Technical support from vendor

b. Business factors:

i. Budget
ii. Vendor’s Reputation
iii. Client’s Interest

5) What test cases can be automated?

Test cases that we want to execute on number of versions of the software
Ex: Regression test cases
Test cases that we want to execute with multiple sets of data
Ex: Data driven test cases
Test cases having complex functionality

6) What test cases cannot be automated?

o Dynamically changing functionality
o Test cases that require more Human interaction
o CUI (command user interface) based test cases

7) Explain about the Testing process in QTP?
Planning:
o Analyzing the Application
o Automation Framework Implementation
o Selecting/Generating Test cases for Automation
o Collecting Test Data
o Configuring Tool Settings
Generating the basic tests
Using Object Repository method or using Descriptive Programming, we can generate Tests
Enhancing Tests
With respect to our project requirements, we have to enhance our tests. For enhancing tests QTP is providing various features like:
o Inserting Transaction points
o Synchronization
o Parameterization
o Inserting VB script Flow Control statements
o Adding comments
o Calling Functions/ calling Actions
o Using Environment variables
o Entering Regular Expressions
o Inserting Checkpoints
o Inserting Output values
Etc..
Note: For any Test all enhancement methods not required.

Debugging Tests (if required)
It is optional; basically scripting languages are Light weight languages, no need to compile them separately. During execution Scripts can be compiled and Run.
If we have any doubts about some scripts, then we can execute them step by step with the support of VBScript Debug commands and Break points

Running tests
Generally, many companies are using Framework feature for Running Tests.
QTP Supports Individual Test execution, Batch execution, Tests execution through AOM Scripting, and Scheduled execution with the support of Windows Operating system.

Analyzing Results
It is not the Responsibility of QTP; Test engineer has to do this manually.
QTP is providing Result window in XML format.
QTP is providing Result deletion tool also.
QTP is providing Test results exporting facility. It supports HTML, Word document and PDF (portable document format) formats.

Reporting defects
Reporting defects also not a QTP responsibility that we have to do manually after analyzing the results, but if we are using Quality Center, from QTP result window we can send defects directly.

8) What types of License available for QTP?

a) Seat License or Node locked

Fixed for one System (Machine), we can use from that System only

b) Concurrent License or Floating License

This License, we can use from different Systems but one at a time

9) What are the QTP supported environments?

QTP Supports Software Applications based on Add-ins only

Add-in means Technology supporting files

QTP Add ins available for following technologies:

a) Default Add ins

1) Activex
2) Visual Basic
3)  Web

b) Other Add-ins
1) Delphi
2) Java
3) .NET Web forms
4) .NET Windows forms
5) WPF (Windows Presentation Foundation)
6) Oracle
7) People Soft
8) Power Builder
9) SAP for Web
10) SAP GUI for windows environment
11) Siebel Environment
12) Standard Windows
13) Terminal Emulator (TE)
14) Visual Age Smalltalk Environment
15) Web Services Environment

10) Does QTP Support UNIX Environment?

No, QTP doesn’t support UNIX/Linux Environment, Supports Windows Operating Environment only, but LoadRunner and Quality Center have support both Windows and UNIX Operating Environments.

11) What is the scripting language that used in QTP for applying programming logic?

Micro Soft Visual Basic Scripting edition (VBScript) engine embedded with QTP.

12) Does QTP Support Database Testing and Data driven Testing?

Yes, SQL Engine embedded with QTP Tool, so we use SQL Statements directly in QTP Test Pane as well as in Function Library.

QTP has an integrated Spread sheet(Excel like) for Performing Data Driven Testing, otherwise we can fetch test data directly from  external files and databases using VB Script.

QTP Interview Questions -2

1) What is Recording in QTP?
It is process of creating the main body of a test by recording the typical processes that users perform.

QuickTest records the operations we perform, displays them as steps in the Keyword View, and generates them in a script (in the Expert View).
2) How many Recording Modes available in QTP? What are they?


There are 3 Recording modes available in QTP.
     1) Normal Recording
     2) Analog Recording
     3) Low Level Recording


3) What is Analog Recording mode?

It Records exact mouse and keyboard operations, we can use this mode for recording continues mouse operations like digital signatures, paints etc..

This mode doesn't generate statements for each and every operation, generates all operations in a Track file.


By default this mode is disabled, after selecting Normal Recording mode only it enables.


4) What is Low Level Recording?


It Records some operations on Non-supported environments apart from Normal operations.


5) What are object and Software Objects?

Object: Object is something, which has structure and properties.

Software Object: an object is any entity that can be manipulated by the commands of a programming language, such as a value, variable, function, or data structure.

Example:

GUI (Windows) Environment: Window, Dialog box, Edit Box, Button, Check Box, Radio Button, List Box and Combo Box etc...

Web Environment: Browser, Page, Link, Image, edit Box, Button, Grid, Frame Etc..


6) What type of Objects available in QTP?

There are 4 types of Objects available in QTP.

     1) Run-time Objects
     2) Test Objects
     3) Utility Objects
     4) Automation / User Defined Objects


7) What are Utility Objects?

These are QTP reserved objects, used for Testing and Result reporting.

Example:

a) SystemUtil
b) Reporter
c) DataTable
d) Services
e) environment etc...


8) What is Automation Object?

An object that is exposed to other applications or programming tools through Automation interfaces.


9) Explain about Object, Property and value?

Object:  It is something which has structure and properties


Property: an attribute of an Object.

Value: Value of the Property


10) What is Object Repository?

It is a Storage place for Storing Objects, QTP has 2 types of Repositories.

  a) Local Repository
  b) Shared Repository


11) What are the differences between Local  and Shared Repositories?

Local Repository:

QTP Creates a Local Repository for every Action during Recording automatically and also QTP maintenance Local Repositories, but user can edit these repositories.

It is a QTP Internal file, extension is .mtr
 
Shared Repository:

User  Creates Shared Repositories by adding objects in Object Repository Manager.This can be shared among nuber of tests.

User has to maintain shared repository files

Shared Repository files are External files, extension is .tsr 


12)  How to Start Test Automation Process, before the Application is ready?

QTP is providing a feature called "Define New Test Object" for creating new objects without Application. This feature available in Local Repository and Object Repository Manager.


13) How to Combine Repositories?

We Can combine Repositories using Object Repository Merge Tool. It is available in Object Repository Manager


14) Explain about Statement, Action and Test in QTP?
   
      a) Statement: an Instruction or a minimal executable unit
      b) Action: Set of Statements
      c) Test: One or more Actions


15) How Load repository files During run-time?


We can Load Object Repositories during run-time using an Utility object called "RepositoriesCollection"

Syntax:
RepositoriesCollection.Add  "path of the Repository file"

Example:

RepositoriesCollection.Add  "D:\ALOK\Login.tsr"