1) Which environments are supported by QTP?
QTP supports the following environments
Active X
Delphi
Java
.Net
Oracle
People Soft
Power Builder
SAP
Siebel
Stingray
Terminal Emulator
Visual Basic
Visual Age
Web
Web Services
2) Technologies supported by QTP:
Web, Java (Core and Advanced), .Net, WPF, SAP, Oracle, Siebel, PeopleSoft, Delphi, Power Builder, Stingray 1, Terminal Emulator, Flex, Web Services, Windows Mobile, VisualAge Smalltalk, Silverlight and mainframe terminal emulator
3) Does QTP run in any environment?
No, QTP works only in the windows environment.
4) Explain the views in the QTP GUI?
Keyword view: This view is a tabular representation of all the objects and the actions that are performed on them. Every row in the table is a step performed on the AUT and can be modified. Some of the most common columns displayed are: item, operation, value and documentation.
Expert view: As the name indicates, this view is for more technical users who would want to tweak the source code as per their requirements.
5) What is QTP’s model for test creation?
a) Determine testing needs – Define testing environment, Analyse your application and plan actions
b) Set up repositories – Local or Shared OR
c) Define function libraries
d) Generate test steps – Add steps, Add checkpoints
e) Data drive your tests
f) Run the tests
6) What are the different kinds of test steps?
5 types of steps:
– Test Object ( Performs actions on a TO)
– Functions
– Utility (Steps to control run session. Eg: Reporter.report)
– Comment
– Programming logic (Loop, conditions…etc)
7) What are the different ways to invoke an application using QTP?
a) SystemUtil.Run
SystemUtil.Run ( FileName, Parameters, Path, Operation )
Example: SystemUtil.Run(“iexplorer.exe”,http://www.google.com)
SystemUtil.Run(“test.txt”, “”,”C:\”,”1”)
b) InvokeApplication
Example: InvokeApplication “C:\Program Files\Internet Explorer\IEXPLORE.EXE http://www.google.com”
c) Creating a shell object using VB Script
Example: Create a “WScript.shell” object.
Dim testshell
Set testshell= CreateObject (“Wscript.shell”)
testshell.run “%windir%\notepad “
8) What are the different recording modes and how do they work?
QTP provides 3 modes of recording:
————
Normal Recording mode – The default recording method is always the normal mode. This method uses the model of Test Objects and Runtime objects to learn and act on the AUT.
Analog recording mode – records the exact mouse and key strokes that the user performs in relation to either the screen or AUT window. The steps that are recorded using this method cannot be edited.
The way this usually gets represented in a code is:
Window/app.RunAnalog “Track1”
One scenario in which this type of recording can be used is when we are trying
to capture a signature.
Low Level recording mode – This mode records the co-ordinates in the application where the operation is performed, irrespective of whether QTP recognizes the specific Object or Operation.
9) Which recording modes need more memory?
Analog and Low-level recording modes
10) Is it possible to switch between recording modes during a test creation?
Yes, in the middle of recording, we can switch to Analog/Low-level mode, finish the task required and go back to normal recording. The switch to Analog mode is available only during recording and not during editing
You will need to create separate Actions which take care of different OS and Browsers
Cross Platform Testing:
Using the Built in Environment Variable you can dig up the OS information.
Eg. Platform = Environment(“OS”). Then based on the Platform you need to call the actions which you recorded on that particular platform.
Cross Browser Testing:
Using this code Eg. Browser(“Core Values”).GetROProperty(“version”) you can extract the Browser and its correspondin version. Ex: Internet Explorer 6 or Netscape 5. Based on this value you call the actions which are relevant to that browser.