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
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 magus@email.com 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")