Professional Documents
Culture Documents
www.gcreddy.com
Introduction to Automation
Testing
• What is Automation Testing ?
• Benefits
1. Preparing to record
– Test Environment
– Test Conditions
1. Recording a session on your application
– Navigate according to Test Conditions
1. Enhancing your test
– Adding logic and conditional statements
– Parameterization
– Inserting checkpoints
4. Debugging your test
– Check that it operates smoothly and without interruption.
QTP Testing Process
5. Run Test
– Check the behavior of your application
5. Reporting defects
QTP Layered Architecture
Logical name
Layer1
Physical Description
Layer2
Application
Layer3
QTP Window Expert
Tree and Expert View Relation
• Displays
• Object hierarchy tree
• Run-time object methods
or test object methods
Object Repository
• Interface between QTP Script and the
Application
• Contains Logical Name and physical
Locate
object in
Description
repository Find data-dependant
property
Parameteriz
property’s
value
Recording Modes
1. Normal recording
Records the objects in your application and the operations performed on them. This mode is the default and takes full
–
advantage of Quick Test’s test object model.
1. Analog Recording
Record the exact mouse and keyboard operations you perform in relation to either the screen or the application window.
–
1. Low-Level Recording
Record on any object in your application, whether or not Quick Test recognizes the specific object or the specific operation.
–
Enhancing Tests
1. Parameterizing Test
2. Regular Expressions
3. Creating Checkpoints
4. Creating Output Values
5. Dividing Tests into Multiple Actions
Parameterizing Tests
To run the scenario with multiple sets of data.
Demo………………..
Demo…………..
• User has to identify the data projected to be change, like dates, so to accepts
any dates, user can use regular expression.
Example :
Actual Date format :
05/19/2004 (mm/dd/yyyy)
After Regular Expression:
[0-1][0-9]/[0-3][0-9]/200[0-9]
Demo……
Demo……..
Click icon
• Check how long a Web page takes to load or if a Web page contains broken links.
Page checkpoint
Database Checkpoint
• Used to check current Database data with the Expected Database
data.
• Demo………
Bitmap Checkpoint
• Checks an area of a Web page or application
after capturing it as a bitmap
• Demo………….
Bitmap Checkpoint
XML Checkpoint
• Checks the data content of XML documents
• Demo………….
XML Checkpoint
XMLFile("Poem.xsl").Check CheckPoint("Poem.xsl_2")
Image Checkpoint
Accessibility
Checkpoint
Creating Output Values
• This is just reverse to the Parameterization, In
this case QTP takes the data from the application
and displays the same in the Data Table.
Creating Output Values
• A transaction represents the business process that you are interested in measuring
• You can measure how long it takes to run a section of your test by defining transactions.
• User can Plan the Scenario as transaction and use the Start Transaction and End
Transaction while Recording.
Transactions
Services.StartTransaction "Start"
Services.EndTransaction "Start"
Actions
• Actions help to divide Test Script into logical units
• Usage :
1)We can design more modular and efficient tests.
2)Actions enable you to parameterize specific components of a
test
3)Two or more tests can call the same action
4)Complex tests may have many actions and may share actions
with
other tests.
• Example:
Actions
We can divide Test Script into multiple actions by creating
new actions or by inserting existing actions.
Kinds of actions:
• Non-Reusable Action : An action that can be used only in the
test in which it was created, and only once.
• Example:
Inserting Existing Actions
Copy of Action : It copied in its entirety, including checkpoints, parameterization, and the corresponding action tab in the Data Table.
•
Inserting Existing Actions
Calls to Actions: We can insert a call (link) to a reusable action that resides in your current test (local action), or in any other test (external action).
•
Tree View
Expert View
Setting Action
•
Properties
The Action Properties enables to modify an action name, add or modify an action description, and set an
action as reusable.
For QTP Information:
www.gcreddy.com