introduction to test automation l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Test Automation PPT PowerPoint Presentation
Download Presentation
Test Automation PPT

Loading in 2 Seconds...

play fullscreen
1 / 36

Test Automation PPT - PowerPoint PPT Presentation


  • 1084 Views
  • Uploaded on

A PPT on Test Automation.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Test Automation PPT' - scltech


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
introduction
Introduction
  • What is Test Automation
  • History of Test Automation
benefits
Benefits
  • Fast
  • Reliable
  • Repeatable
  • Programmable
  • Comprehensive
  • Reusable
manual vs automation
Manual Vs Automation
  • Pros of Test Automation
    • Effective solution for Test repeatability
    • Effective during Code changes
    • Can run parallel on multiple machines
    • Effective Test Coverage
manual vs automation5
Manual Vs Automation
  • Cons of Test Automation
    • Cost
    • Not effective against Visual reference
    • Maintenance may be an Issue
selection criteria
Selection Criteria
  • Functionality: Compatibility
  • Reliability : Tolerance & Recovery Capability
  • Usability
  • Efficiency: Time
  • Maintainability
  • Portability: Adaptability & Installation
  • Support: Support and Upgrades
  • Cost: License and Pricing
the test object a quick understanding
THE TEST OBJECTA quick understanding
  • The Test Object is the core of Test Automation
  • Test Object can represent any visual or virtual collection of properties
  • The are four types of Test Objects

1) Run time objects

2) Test objects

3) Utility objects

4) User defined objects

qtp test object model
QTP Test Object Model

Definition: The Test object model is a large set of object types or classes that QuickTest uses to represent the objects in your application. 

  • TEST OBJECT
    • A test object is an object that QuickTest creates in the test to represent the actual object in your application, during the record session. (THE EXPECTED RESULT)
  • RUN TIME OBJECT
    • A run-time object is the actual object in your Web site or application on which methods/operations are performed during the run session (THE ACTUAL RESULT)

“COMPARISION OF TEST OBJECT AGAINST THE RUN TIME OBJECT GENERATES THE RESULT OF THE TEST”

the object repository
The Object Repository
  • Understanding the Physical and Logical Names
  • There are two types of repository available in QTP.
    • 1. Local repository (.MTR extension)
    • 2. Shared repository(.TSR extension)
architecture of qtp
Architecture of QTP
  • TITLE BAR
  • MENU BAR
  • TOOL BARS
  • TEST TAB
  • KEYWORD VIEW
  • EXPERT VIEW
  • DATA TABLE
  • ACTIVE SCREEN
  • INFORMATION PANE
stages of automation
Stages of Automation
  • Planning
  • Recording
  • Enhancing
  • Debugging
  • Execution/Running
  • Analysis
  • Reporting
anatomy of object recognition
Anatomy of Object Recognition

Logical Name

Properties

Physical/Descriptive Properties

WinButton(“OK”).Click

the active screen
The Active Screen
  • QTP captures every step detail as a bitmap image
  • The bitmap image is dynamic in nature
  • Active Screen allows QuickTest users to check property values, insert checkpoints and output values
the data table
The Data Table
  • A Data Table in an inbuild Data sheet within QuickTest
  • There are two types of Datasheets
    • Global Data Sheet
    • Local Data Sheet
  • Data table are available in two ways
    • 1. Design time data table (Attached with every test)
    • 2. Run time data table (Available in result window), Run time is a carbon copy of the design Data Table
understanding qtp script windows apps
Understanding QTP ScriptWindows Apps

Object

Window

Button

Text Box

Radio Button

Check Box

Menu

Combo Box

Password

QTP Object Type

Window

WinButton

WinEdit

WinRadioButton

WinCheckbox

WinMenu

WinComboBox

WinEdit

Object Property

Activate/Close

Click

Set/Type

Set

Set “ON”/”OFF”

Select “S1;S2”

Select “X1”

SetSecure “encrpt”

understanding qtp script web apps
Understanding QTP ScriptWeb Apps

Object

Button

Text Box

Radio Button

Check Box

Browser Menu

Combo Box

Hyperlink

QTP Object Type

WebButton

WebEdit

WebRadioGroup

WebCheckbox

WinMenu

WebList

Link

Object Property

Click

Set/Type

Set

Set “ON”/”OFF”

Select “S1;S2”

Select “X1”

Click

remember the syntax the easy way
Remember the Syntax“The Easy Way”

What Parent Window

What Child Window

What Object Type

What Operation

What Browser

What

Page

What Object Type

What Operation

Examples:

Window(“Register”).Dialog(“SCL”).WinEdit(“OK”).Click

Browser(“SCL”).Page(“Register”).WebButton(‘OK”).Click

slide24

Script 1:

Steps:

Enter Date of Flight

Select Fly From

Select Fly To

Click Flights Button

Enter Name

Select First Class

Enter Tickets as 10

Insert Order

Exit

slide25

Script 1 : Answer

Window("Flight Reservation").Activate

Window("Flight Reservation").WinComboBox("Fly From:").Select "London"

Window("Flight Reservation").WinComboBox("Fly To:").Select "Los Angeles"

Window("Flight Reservation").WinButton("FLIGHT").Click

Window("Flight Reservation").WinEdit("Name:").Set "Srikkanth"

Window("Flight Reservation").WinRadioButton("First").Set

Window("Flight Reservation").WinEdit("Tickets:").Set "12"

Window("Flight Reservation").WinButton("Insert Order").Click

Window("Flight Reservation").WinMenu("Menu").Select "File;Exit"

slide26

Script 2 :

Steps:

Enter First Name

Enter Last Name

Enter desired Login

Click on Check Availability

Choose password

Re-enter password

Stay Signed

Set Google as Home page

Select Write my own question

Enter Answer

Enter secondary email

Select location as Canada

Enter Verification

Accept Terms

slide27

Script 2 : Answer

Browser("Google Accounts").Page("Google Accounts").WebEdit("FirstName").Set "srikkan"

Browser("Google Accounts").Page("Google Accounts").WebEdit("LastName").Set "danthala"

Browser("Google Accounts").Page("Google Accounts").WebEdit("Email").Set "srikka"

Browser("Google Accounts").Page("Google Accounts").WebButton("check availability!").Click

Browser("Google Accounts").Page("Google Accounts").WebEdit("Passwd").SetSecure "4b51595c615a5953537"

Browser("Google Accounts").Page("Google Accounts").WebEdit("PasswdAgain").SetSecure "4b51596475520a"

Browser("Google Accounts").Page("Google Accounts").WebCheckBox("PersistentCookie").Set "ON"

Browser("Google Accounts").Page("Google Accounts").WebCheckBox("smhck").Set "ON"

Browser("Google Accounts").Page("Google Accounts").WebCheckBox("homepageSet").Set "ON"

Browser("Google Accounts").Page("Google Accounts").WebList("selection").Select "Write my own question"

Browser("Google Accounts").Page("Google Accounts").WebEdit("ownquestion").Set "my world"

Browser("Google Accounts").Page("Google Accounts").WebEdit("IdentityAnswer").Set "QTP"

Browser("Google Accounts").Page("Google Accounts").WebEdit("SecondaryEmail").Set "hello@hello.com"

Browser("Google Accounts").Page("Google Accounts").WebList("loc").Select "Denmark (Danmark)"

Browser("Google Accounts").Page("Google Accounts").WebEdit("newaccountcaptcha").Set "deconolin"

Browser("Google Accounts").Page("Google Accounts").WebButton("I accept. Create my account.").Click

recording modes in qtp
Recording Modes in QTP
  • Normal Recording

- This is the default mode

- Records all objects and Operation associated/performed with Object

2) Analog Recording

- Generally used for Bitmap capturing

  • Analog mode recording is saved in a separate data-file
  • Analog mode data file can not be edited within QuickTest

3) Low Level Recording

  • Generally used to record objects that not recognised by QTP and also when exact coordinates are important for the test
  • Coordinates recorded can be edited as per the test requirements
run modes in qtp
Run Modes in QTP
  • Normal Run Mode
    • This is the Default Run Mode in QTP
    • Visually displays the steps executed within the script
    • User can customize execution times and delays
    • The Normal run mode option requires more system resources
    • Microsoft Script Debugger should be installed to enable this mode.
  • Fast Run Mode
    • Does not visually display the step execution
    • This option requires fewer system resources
    • When running a test set from Quality Center, tests are automatically run in Fast mode, even if Normal mode is selected in QuickTest
understanding qtp checkpoints
Understanding QTP Checkpoints

Check points is a method which checks the content, image or a AUT(application under Test) scenario in QTP before or after any step.

Types of check points:-

  • 1. Standard Check Point
  • 2. Bitmap Check Point
  • 3. Database Check Point
  • 4. Text Check Point
  • 5. Text Area Check Point
  • 6. Accessibility Check Point
  • 7. XML Check Point
synchronization
Synchronization

There are three methods to insert synchronization in QuickTest

  • Wait

Example:

Window(“Login”).WinEdit(“Username“).Set “user“

Wait (2)

Window(“Login“).WinEdit(“’Password“).Set “password”

  • Sync

Example:

Window(“Login”).WinEdit(“Username“).Set “user“

Window(“Login”).WinEdit(“Password”).Sync

Window(“Login“).WinEdit(“’Password“).Set “password”

  • Synchronization Point

Example:

Browser("Gmail").WaitProperty "name","Welcome to Gmail", 5000

      • name - property name
      • Welcome to Gmail - property value
      • 5000 - number of milli seconds to wait
methods in quicktest
Methods in QuickTest

Activate:

Method: It activates the window/dialog

Example:Dialog(“Login”).ActivateWindow(“Flight Reservation”).Activate

Click

Method: It clicks on an object (Buttons)Syntax: Object hierarchy.

Example:Dialog(“Login”).Winbutton(“ok”).click

Close

Method: It closes the window

Example:Window(“Flight Reservation”).CloseBrowser(“Browser”).Close

Set

Method: For setting the value of an edit box

Example: Dialog (“Login”).WinEdit(“Agent Name”).Set “asdf” b. Selecting a Radio ButtonSyntax: Object Hierarchy. SetEx: Window("Flight Reservation").WinRadioButton("Business").Setc. Selecting/Deselecting check boxesSyntax:object Hierarchy.Set “ON/off” Ex: Window ("Flight Reservation"). Dialog("Open Order").WinCheckBox("OrderNo.").Set "ON"

methods in quicktest33
Methods in QuickTest

Select

Method:It is used for selecting an item from a combo box or list box.

Example:

Window("Flight Reservation").WinComboBox("Fly From:").Select "London"B.

Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select "12572

GetVisibletext

Method: It returns Text from the specified area.

Example:

x=Window("Flight Reservation").WinComboBox("Fly From:").GetVisibleText

msgbox x

GetRoproperty

Method:It returns current object property value. It can be used for getting any object’s property

Example: x=Window("Flight Reservation").WinEdit("Tickets:").GetROProperty ("width")

msgbox x

methods in quicktest34
Methods in QuickTest

Navigate

Method: It opens a specified URL in the Browser.

Example: Browser("Yahoo!").Navigate "http://www.google.co.in"

Getitemscount

Method: It returns number of items in a combobox

Example: x=Window("Flight Reservation").WinComboBox("Fly From:").GetItemsCount

msgbox x

Getcontent

Method: It returns all items from a combobox.

Example: x=Window("Flight Reservation").WinComboBox("Fly From:").GetContent

msgbox x

Exist

Method: It checks whether the object is available or not.

Ex: Window("Flight Reservation").Exist(5)

output value
Output Value

Output Value is a step by which one or more values can be captured during execution.

  • Types of Output Values:

1.Standard output value

2.Text output value

3.Text area output value

4.Database output value

5.XML output value

data driven testing
Data Driven Testing

Data Driven Testing: Testing the Same operation with multiple sets of test data.

Parameterization

  • Passing parameters, through this concept we can pass multiple values

Types of Parameterization:

1. Through Loop Statements

2. Dynamic Test Data Submission

3. Through Data Table

4. Fetching Test Data directly from External files (Flat files & Spreadsheets)

5. Fetching Test Data directly from Databases (MSAcess, oracle etc).

6. Getting Test Data from front end objects.