You are on page 1of 6

QTP Interview Questions-I QTP Basic Features

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) 3) 5) 6) 7)

Load/Stress/Performance Test Tools Security Test Tools Test Management Tools Unit Test Tools 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. Vendors Reputation iii. Clients 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 doesnt 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.
Dim qtApp 'As QuickTest.Application ' Declare the Application object variable Dim qtTest 'As QuickTest.Test ' Declare a Test object variable Dim qtResultsOpt 'As QuickTest.RunResultsOptions ' Declare a Run Results Options object variable Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object qtApp.Launch ' Start QuickTest qtApp.Visible = True qtApp.Open "C:\Tests\Test1", True ' Open the test in read-only mode. Include your driver script here. Set qtResultsOpt = CreateObject("QuickTest.RunResultsOptions") ' Create the Run Results Options object qtResultsOpt.ResultsLocation = "C:\Tests\Test1\Res1" ' Set the results location qtTest.Run qtResultsOpt ' Run the test

The complete code and details can be found in the QTP help file for Automation Object Model. The next step is we should merge the code for QTP options/settings within this code. The options/settings code can be easily generated automatically.

Click Tools->Options from QTP IDE to open the below screen.

Click "generate" in the above screen to automatically generate the code. - Then add a task in windows scheduler for calling the .vbs file. You can do it by using Schedule Task wizard from settings->control panel->Scheduled Tasks->Add Scheduled Task Click "Browse" in the below screen of the wizard to set specify your .vbs file.

- Locking the system while running the script will affect the script running.So don't lock your machine while running the script. Anyway, you can add the below code at end of your .vbs file to lock the system automatically once after completing execution of the script.
Set obj = CreateObject("WScript.Shell") sCmnd = "%windir%\SYSTEM32\rundll32.exe user32.dll,LockWorkStation" obj.Run sCmnd, 0, False

You might also like