SlideShare a Scribd company logo
UI AUTOMATION
        Magus Chen
http://magustest.com/blog/
 maguschen@gmail.com
Agenda

● What is UI Automation
● Common tools and framework
● Selenium2/WebDriver
● Continuous Integration
● Data Driven
● Keyword Driven
● Page Object Pattern
● The Future
What is UI Automation

● End to End functional test
● Executed by program
● Verify result by program
● Report defect by program
● Logging for debug
Common tools and framework

●   Commercial
    ○ HP QuickTest Pro
    ○ IBM Rational Functional Tester
●   Open Source
    ○ Selenium/WebDriver
    ○ Watir
    ○ FitNesse
    ○ Sikuli
Selenium2/WebDriver

● Two sophisticated browser automation frameworks are
   merged
   ○ http://seleniumhq.org/
   ○ http://code.google.com/p/selenium/
● Pros
   ○ APIs in popular languages
   ○ Multi-Browser and Multi-OS
   ○ Support many test frameworks
   ○ Support AJAX
Continuous Integration

● What is CI
● Glue in UI Automation
● Parallel test execution
Data Driven

● Test data + re-usable test logic

   Test data:
  Fields                     Data set 1       Data set 2

  Title                      test title one   long title

  Description                simple desc      unicode desc


   Test logic:
     ○     Navigate to target page
     ○     Fetch test data
     ○     Enter title and description
     ○     Submit form
     ○     Verify result
Keyword Driven

● Based on data driven
● Separate the test script developer and test case designer

  Object            Action      Data                 Comment

  signin_username   input       magus@email.com      username

  signin_password   input       password

  signin_btn        click                            page refresh

  page_title        check       Login successfully
Page Object Pattern

● Reuse test code and reduce duplication
● Readable test code
● Focus on "What to do" instead of "How to do"
● Expose method that represent an element that can be seen and
   can be operated on the page
  driver.findElement(By.id("user")).sendKeys("magus");
  driver.findElement(By.id("pwd")).sendKeys("password");
  driver.findElement(By.id("submit")).click()
                              VS
  login_page.login("magus", "password")
The Future

● Parallel
● Run in the cloud
● Example: http://saucelabs.com

More Related Content

PDF
AngularJS Basics
PPT
Session vii(java scriptbasics)
PPTX
Learn TypeScript from scratch
PPT
Java Script
PPT
INFO 3775 Chapter 2 Part 1
PPTX
Web topic 21 pass info via javascript
PDF
Javascript DOM
PPTX
Performance & dev tools
AngularJS Basics
Session vii(java scriptbasics)
Learn TypeScript from scratch
Java Script
INFO 3775 Chapter 2 Part 1
Web topic 21 pass info via javascript
Javascript DOM
Performance & dev tools

What's hot (12)

PPTX
Javascript
PPTX
Introduction to html
PPTX
Javascipt
PPT
JavaScript Missing Manual, Ch. 1
PDF
JavaScript Roadmap - DOM Manipulation
ODP
Css,javascript,php,mysql
PDF
Lesson 12
PPTX
Live Project On ASP.Net Core 2.0 MVC - Free Webinar
PPTX
Java script writing javascript
PPT
Introduction to javaScript
PDF
Typescript for grails
PPT
Being mean at hackathons
Javascript
Introduction to html
Javascipt
JavaScript Missing Manual, Ch. 1
JavaScript Roadmap - DOM Manipulation
Css,javascript,php,mysql
Lesson 12
Live Project On ASP.Net Core 2.0 MVC - Free Webinar
Java script writing javascript
Introduction to javaScript
Typescript for grails
Being mean at hackathons
Ad

Similar to Ui automation (20)

PPT
PPT
selenium.ppt
PPT
selenium.ppt
PPT
selenium.ppt
PDF
BDD, ATDD, Page Objects: The Road to Sustainable Web Testing
PPT
Test Automation Framework Development Introduction
PPTX
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
PPT
Selenium
PDF
Webapp Automation Testing of performance marketing and media platform
PPTX
Web UI Tests: Introduce UI tests using Selenium
PPTX
Automated Testing on Web Applications
PDF
Selenium course training institute ameerpet hyderabad
PDF
Selenium course training institute ameerpet hyderabad – Best software trainin...
PDF
Testing course content converted
PPT
By combining Selenium for frontend testing and tools
PPTX
Automation solution using jbehave, selenium and hudson
PDF
Implementing Test Automation in Agile Projects
PDF
Testing Experience - Evolution of Test Automation Frameworks
PPTX
DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
PPT
Test Automation Best Practices (with SOA test approach)
selenium.ppt
selenium.ppt
selenium.ppt
BDD, ATDD, Page Objects: The Road to Sustainable Web Testing
Test Automation Framework Development Introduction
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
Selenium
Webapp Automation Testing of performance marketing and media platform
Web UI Tests: Introduce UI tests using Selenium
Automated Testing on Web Applications
Selenium course training institute ameerpet hyderabad
Selenium course training institute ameerpet hyderabad – Best software trainin...
Testing course content converted
By combining Selenium for frontend testing and tools
Automation solution using jbehave, selenium and hudson
Implementing Test Automation in Agile Projects
Testing Experience - Evolution of Test Automation Frameworks
DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
Test Automation Best Practices (with SOA test approach)
Ad

Recently uploaded (20)

PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
August Patch Tuesday
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Approach and Philosophy of On baking technology
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
Spectroscopy.pptx food analysis technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPT
Teaching material agriculture food technology
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
1. Introduction to Computer Programming.pptx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Encapsulation theory and applications.pdf
Programs and apps: productivity, graphics, security and other tools
Heart disease approach using modified random forest and particle swarm optimi...
A comparative analysis of optical character recognition models for extracting...
Accuracy of neural networks in brain wave diagnosis of schizophrenia
August Patch Tuesday
SOPHOS-XG Firewall Administrator PPT.pptx
Group 1 Presentation -Planning and Decision Making .pptx
Approach and Philosophy of On baking technology
Assigned Numbers - 2025 - Bluetooth® Document
Spectroscopy.pptx food analysis technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Teaching material agriculture food technology
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
1. Introduction to Computer Programming.pptx
gpt5_lecture_notes_comprehensive_20250812015547.pdf
NewMind AI Weekly Chronicles - August'25-Week II
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Encapsulation_ Review paper, used for researhc scholars
Encapsulation theory and applications.pdf

Ui automation

  • 1. UI AUTOMATION Magus Chen http://magustest.com/blog/ [email protected]
  • 2. Agenda ● What is UI Automation ● Common tools and framework ● Selenium2/WebDriver ● Continuous Integration ● Data Driven ● Keyword Driven ● Page Object Pattern ● The Future
  • 3. What is UI Automation ● End to End functional test ● Executed by program ● Verify result by program ● Report defect by program ● Logging for debug
  • 4. Common tools and framework ● Commercial ○ HP QuickTest Pro ○ IBM Rational Functional Tester ● Open Source ○ Selenium/WebDriver ○ Watir ○ FitNesse ○ Sikuli
  • 5. Selenium2/WebDriver ● Two sophisticated browser automation frameworks are merged ○ http://seleniumhq.org/ ○ http://code.google.com/p/selenium/ ● Pros ○ APIs in popular languages ○ Multi-Browser and Multi-OS ○ Support many test frameworks ○ Support AJAX
  • 6. Continuous Integration ● What is CI ● Glue in UI Automation ● Parallel test execution
  • 7. Data Driven ● Test data + re-usable test logic Test data: Fields Data set 1 Data set 2 Title test title one long title Description simple desc unicode desc Test logic: ○ Navigate to target page ○ Fetch test data ○ Enter title and description ○ Submit form ○ Verify result
  • 8. Keyword Driven ● Based on data driven ● Separate the test script developer and test case designer Object Action Data Comment signin_username input [email protected] username signin_password input password signin_btn click page refresh page_title check Login successfully
  • 9. Page Object Pattern ● Reuse test code and reduce duplication ● Readable test code ● Focus on "What to do" instead of "How to do" ● Expose method that represent an element that can be seen and can be operated on the page driver.findElement(By.id("user")).sendKeys("magus"); driver.findElement(By.id("pwd")).sendKeys("password"); driver.findElement(By.id("submit")).click() VS login_page.login("magus", "password")
  • 10. The Future ● Parallel ● Run in the cloud ● Example: http://saucelabs.com