Você está na página 1de 8

1. Why do we need Automation?

Automation used when:


To speed up the testing process
To reduce the human errors
To Maintain the Test to reuse
2. What are the advantages of QTP when compared with other functional automation tools?
QTP is an Advanced Keyword Driven Testing.
The Action Parameters allow you to generalize the testing actions for greater reusability
It supports ERP/CRM, .NET, Web Services and Multimedia
It contains an Active Screen which gives the snapshot of the application
It supports the languages such as European, Japanese, Chinese, and Korean
3. What are the limitations of QTP?
QTP does not support Flash
4. Does QuickTest have any debugging capabilities?
Yes
5. What are the environments supported by QTP?

Windows Applications
(MFC)
Visual Basic
Java
ActiveX

Enterprise Applications
SAP
Oracle
PeopleSoft
Siebel

Web Technologies
HTML
DHTML
JavaScript

Browsers
IE
Netscape
AOL

Emerging Technologies
.Net Win forms,
Web forms, Web services
J2EE Web services
XML, WSDL, UDDI

Terminal Emulators
3270
5250
VT100

Server Technologies
Oracle
Microsoft
IBM
BEA
ODBC
COM/COM+

6. Explain Testing Life Cycle

Languages
Multimedia
RealAudio/Real Video
Windows Media Player
Flash

European
Japanese
Chinese (traditional and
simplified)
Korean

Identify the objects to the Object Repository


Identify the Reusable Actions
Identify the Functions
Author the Script for the testing
Enhance the Script based on the Requirements
Debug the Test
Run the Test
Analyze the Results
Report the Defects
7. What are the different types of recording?
There are three types of recording in Quick Test
Standard Recording
Analog Recording
Low-Level Recording
8. Differences between analog and low-level recordings?
Analog Recording
Records the Exact mouse movements and the keyboard operations
Records with respect to Screen and Window
Generates a single statement called a Track in the test script
We cannot edit the steps in the Analog recording
Low-Level Recording
Records all the Run time object as Win Object
Records on any object whether QTP identifies or not
9. How to record on non standard menus?
Record using Analog mode and Low-Level mode
10. How can I record on objects or environments not supported by QuickTest?
By creating Virtual Object and Perform Analog recording on those objects
11. What is the Syntax for an Exist sync statement?
Object. Exist (Timeout)
Example:
If Browser ("Mercury Tours").Exist Then
MsgBox "The browser exists."
End If
12. What is the diff between Wait () and Exist ()?
You can enter Exist and/or Wait statements to instruct QuickTest to wait for a window to open or an
object to appear. Exist statements return a Boolean value indicating whether or not an object
currently exists. Wait statements instruct QuickTest to wait a specified amount of time before

proceeding to the next step. You can combine these statements within a loop to instruct QuickTest
to wait until the object exists before continuing with the test or component.
13. Why do you need synchronization and explain how global synchronization is implemented?
When you run a test or component, your application may not always respond with the same speed.
For example, it might take a few seconds:

for a progress bar to reach 100%


for a status message to appear
for a button to become enabled
for a window or pop-up message to open

14. What are the different types of views available in QTP?


Keyword View
Expert View
15. What are mandatory properties?
Mandatory provides unique identification of the objects. The default properties are also
called as the Mandatory properties. For example the default properties for the Web Image
Object are alt, html tag and image type
16. Why do we use SPY?
SPY is used to view the Properties and the Methods of the Object in the application
17. How to change the logical name of a Test Object?
The Logical name is the name of the object that QTP identified in the application.
Right click on the Object name and select Rename to rename the logical name of the
object
18. How many ways you can add object in repository?
Use the Add Objects option in the Object Repository dialog box. You can add any object as a
single object or a parent object, along with all its children.
Choose the View/Add Object option from the Active Screen.
Insert a step in your test or component for a selected object from the Active Screen.

19. What is the use of active screen at least 3 uses?


Active screen is used to show the snapshot of the application
To insert the Check Points we can use the Active screen
To view the Source
To add the objects to the object repository

20. Can I store functions and subroutines in a function library


Yes
21. How we make actions reusable?
After creating the test action, in the Keyword view right click on the respective action and
select Action Properties, Check the Reusable Action
22. What are the different files available in QTP and their use?
Object Repository File To store the Objects in the application
Recovery Scenario File To store the Collection of the Recovery Scenarios
Library File
VBS File
23. What is Smart identification?
Smart Identification is used when there is an Ambiguity between the two objects
When two objects in an application contains same properties then identifying the objects is
very difficult, at these conditions Quick test identifies the object by enabling the smart
identification
24. What is correlation?
The process in which the output value of a variable is used as an input to the another
variable
25. What is recovery scenario? Do we use this in real time?
Unexpected events, errors, and application crashes during a run session can disrupt your
run session and distort results. This is a problem particularly when running tests or
components unattendedthe test or component is suspended until you perform the
operation needed to recover.
26. How to use Environment variable
27. What is the extension on recovery scenario file?
< .qrs >
28. Which method is used to call a function which is in the VBS file?
29. How many ways can we provide input to an action?
Three Ways we can provide input to an action
1. Data table
2. Environmental Variable
30. How to execute VB function?
Call Function<Function Name>
31. How many types of Check points are there in QTP?
Standard Checkpoint
Text Checkpoint
Text Area Checkpoint
Bitmap Checkpoint
Database Checkpoint
Accessibility Checkpoint
XML Checkpoint (Web Frame)

XML Checkpoint (File)


32. What is descriptive programming?
You can also instruct QuickTest to perform methods on objects without referring to the Object
Repository, without referring to the objects logical name. To do this, you provide QuickTest with a
list of properties and values that QuickTest can use to identify the object or objects on which you
want to perform a method. This is called as descriptive programming.
33. How to send messages to test the result?
Reporter. report event is used to send the messages to the test results
34. How does QuickTest capture user processes in Web pages?
35. How can I record and run tests on objects that change dynamically from viewing
To viewing?
Sometimes the content of objects in a Web page or application changes due to dynamic
content. You can create dynamic descriptions of these objects so that QuickTest will recognize them
when it runs the test
36. How can I check that a child window exists (or does not exist)?
Sometimes a link in one window creates another window. You can use the Exist method to
check whether or not a window exists. For example:
Browser ("Window_logical_name").Exist
You can also use the Child Objects method to retrieve all child objects (or the subset of child
objects that match a certain description) on the Desktop or within any other parent object.

37. How does QuickTest record on dynamically generated URLs and Web pages?
QuickTest actually clicks on links as they are displayed on the page. Therefore, QuickTest records
how to find a particular object, such as a link on the page, rather than the object itself. For example,
if the link to a dynamically generated URL is an image, then QuickTest records the "IMG" HTML tag,
and the name of the image. This enables QuickTest to find this image in the future and click on it.
38. How does QuickTest handle cookies?
Server side connections, such as CGI scripts, can use cookies both to store and retrieve
information on the client side of the connection. QuickTest stores cookies in the memory for each
user, and the browser handles them as it normally would.
39. Where can I find a web page's cookie?
40. Is text area check point supported by web application?

41. What is the difference between image check point and Bitmap check point?
Image checkpoints enable you to check the properties of a Web image. In the Image Checkpoint
Properties dialog box, you can specify which properties of the image to check and edit the values of
those properties. This dialog box is similar to the standard Checkpoint Properties dialog box, except
that it contains the Compare image content option. This option enables you to compare the
expected image source file with the actual image source file.
Bitmap Checkpoint checks an area of your Web page or application as a bitmap. 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 that the map zooms
in correctly.
42. How do I maintain my test when my application changes?
The way to maintain a test when your application changes depend on how much your application
changes. This is one of the main reasons you should create a small group of tests rather than one
large test for your entire application. When your application changes, you can rerecord part of a
test. If the change is not significant, you can manually edit a test to update it.
43. How do you handle new objects that appear in a new version of the same software?
Adding the new objects in the object repository
BY changing the Index property in the repository
44. How do we add a step to the Action during test run?
45. Parameterizing an Object doesn't parameterize the steps in the Expert view - Why?
46. How do I use QuickTest together with Test Director?
47. How to change the registry?
48. Please Explain difference b/w function and Action?
49. What is the difference between application testing and product testing?
50. What is the difference between keyword view and expert view?
Expert View: Actions performed by the user are shown in the form of script.

keyword view : Actions performed by the user are shown in tree format along with the input data .
Even window and object details are shown. The correspondent window and object can be viewed.
51. Where do you use Browser(ppLoginBrowser).Dialog(SecurityAlertDialog).Exist
52. . How do you fetch data from search results grid using vb script. Is there any method to
fetch value from
53. How do you call functions in QTP Project without adding test settings, resources(library
functions).Is
Add your library path which has all your VBScript files or functions to
tools-->options-->folders

lib_path = PathFinder.Locate("filename.vbs")
Call executefile(lib_path)
Then u can call functions which are defined in the filename.vbs file. You need not to have this in Test->Settings-->resources
Ex : Login(username,password)
Login is the function which is defined in the "filename.vbs"

54. . How do you connect to database using vbscript ?


Here is the sample script of using data base connection.........
SQL="SELECT * FROM ORDERS"
connection_string="QT_Flight32" isConnected = db_connect ( curConnection ,connection_string )
If isConnected = 0 then ' execute the basic SQL statement set myrs=db_execute_query( curConnection
, SQL ) ' report the query and the connection string Reporter.ReportEvent micInfo ,"Executed query and
created recordset ","Connection_string is ==> " & connection_string & " SQL query is ===> " & SQL '
show the number of rows in the table using a record set msgBox " Quantity of rows in queried DB
( db_get_rows_count )==> " & db_get_rows_count( myrs ) ' show the number of rows in the table using
a new SQL statement msgBox " Quantity of rows in queried DB (db_get_rows_count_SQL ) ==> " &
db_get_rows_count_SQL( curConnection , "SELECT COUNT(*) FROM ORDERS" ) ' change a value of
a field in an existing row rc = db_set_field_value (curConnection, "ORDERS" , "Agents_Name" , "test",
"Agents_Name", "AGENT_TESTER") ' examples of how to retrieve values from the table msgBox "val
row 0 col 0: " & db_get_field_value( myrs , 0 , 0 ) msgBox "val row 0 col 1: " & db_get_field_value( myrs
, 0 , 1 ) msgBox "val row 1 col Name: " & db_get_field_value( myrs , 1 , "Agents_Name" ) msgBox "val
SQL row 1 col Name: " & db_get_field_value_SQL( curConnection , "ORDERS" , 1 , "Agents_Name" )
db_disconnect curConnectionEnd If
General Help Questions in QTP

How does QuickTest handle session IDs?

The server, not the browser, handles session IDs, usually by a cookie or by embedding the session ID in all
links. This does not affect QuickTest.

How does QuickTest handle server redirections?

When the server redirects the client, the client generally does not notice the redirection, and misdirection
generally do not occur. In most cases, the client is redirected to another script on the server. This additional
script produces the HTML code for the subsequent page to be viewed. This has no effect on QuickTest or
the browser.

How does QuickTest handle meta tags?

Meta tags do not affect how the page is displayed. Generally, they contain information only about who
created the page, how often it is updated, what the page is about, and which keywords represent the page's
content. Therefore, QuickTest has no problem handling meta tags.

Does QuickTest work with .asp?

Dynamically created Web pages utilizing Active Server Page technology have an .asp extension. This
technology is completely server-side and has no bearing on QuickTest.

Does QuickTest work with COM?

QuickTest complies with the COM standard.


QuickTest supports COM objects embedded in Web pages (which are currently accessible only using
Microsoft Internet Explorer) and you can drive COM objects in VBScript.

Does QuickTest work with XML?

XML is eXtensible Markup Language, a pared-down version of SGML for Web documents, that enables
Web designers to create their own customized tags. QuickTest supports XML and recognizes XML tags as
objects.
You can also create XML checkpoints to check the content of XML documents in Web pages, frames or
files. QuickTest also supports XML output and schema validation.

Você também pode gostar