SlideShare a Scribd company logo
UI Testing Paradigm

  SELENIUM
nathangloyn
@NathanGloyn
Design Code Release
nathans.dropbox@gmail.com
Agenda

 UI testing
 Why use Selenium?
 Selenium: Origins
 Selenium: IDE & Concepts
 Selenium: WebDriver
 Selenium: Advanced concepts
 Summary
 Questions
What is UI testing?

 a.k.a System Testing, Functional testing
 Use UI to drive the system
 All parts of system exercised
 Ensure that UI behaves as expected
Testing through the UI

 Pros
   Ensure that system works as a whole
   Easy regression testing


 Cons
   Expensive
   Time consuming
Why use Selenium

 Free
 Open source
 Supports Java, Ruby, .Net, Python, PHP & Perl
 Portable
 Combine with other tools
Origins

 Thoughtworks
 Jason Huggins
 Javascript
 Java + Http Request
 Simon Stewart
 WebDriver
Origins: Projects

Selenium 2.0
         1.0
                       Web driver
                       Selenium Core




Remote Control   IDE      Grid
Selenium IDE

 Firefox addin
 Record & replay
 Supports plugins
 Creates Selenese scripts
 Can output unit tests in various languages
Selenium IDE


Demo
Concepts: Assert vs Verify

 a.k.a hard or soft assertions
 Different uses
 Fail Assert = immediate test failure
 Fail verify = continue to end of test
 Use depends on test
Concepts: Commands

 Actions
   Click
   keyDown
 Accessors
   Title
   Text
 Assertions
   Assert
   Verify
Concepts: Locators

 id
 Name
 Tag Name       Attribute based
 Class Name
 CSS
 Link
                 Content based
 Partial link
 Xpath          Structure based
Concepts using Selenium IDE


Demo
Selenium IDE: Summary

 Easy way to get started
 Able to create suites of tests
 Very good for quick smoke tests e.g navigation
 Test can be exported to different languages
 Limited to FireFox
 Very data sensitive
 Not usable from a CI server
Web Driver

 Has native browser specific drivers
 No server needed
 Object Oriented API
 HtmlUnit support
 Support for Selenium RC
WebDriver


Demo
Brittle tests

 Data dependent
 Framework & test code combined
 Incorrect locators
Data

 Deterministic vs Non-Deterministic
 Static vs Dynamic
 Easier vs Hard
Brittle tests


Bad Code
Page Object Pattern

 Popular design pattern in testing
 Abstracts a page
 Encapsulates all operations
 Helps prevent brittle tests
 Page Object does not assert or verify
Page Object Pattern


Demo
Domain Specific Language

 Abstraction
 Specification
 Not a “proper” DSL
 Readable
 Build it piece at a time
 Investment
Domain Specific Language


Demo
Summary

 Tests the application end to end
 Very easy to get going with
 Strategies to avoid brittle tests
 Free
 Investment in tests
Questions?

More Related Content

PPT
Selenium Primer
PDF
Introduction to Selenium Automation
PPTX
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
PDF
Continuous Testing Meets the Classroom at Code.org
PPTX
Selenium IDE
PPTX
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
PPTX
Introduction to selenium
PPTX
Selenium
Selenium Primer
Introduction to Selenium Automation
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Continuous Testing Meets the Classroom at Code.org
Selenium IDE
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
Introduction to selenium
Selenium

What's hot (20)

DOCX
Selenium webdriver course content rakesh hansalia
PPTX
Python selenium
PPT
Selenium Ide Tutorials
PDF
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
PPTX
Test Automation and Selenium
DOCX
Selenium training course_content_3_days
PDF
Selenium Framework using Java | Selenium Tutorial | Selenium Training Online ...
PDF
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
PPT
Selenium
PPT
Selenium
PPTX
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
PPTX
Maintainable UI Tests with Selenium and C#
PPTX
Selenium rc ppt
PDF
Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011
PPTX
Cross-browser unit testing JavaScript
PPTX
Beyond the Release: CI That Transforms Organizations
PDF
Introduction to Automation Testing and Selenium overiew
ODP
Automated UI testing. Selenium. DrupalCamp Kyiv 2011
PDF
Automated UI testing.Selenium.DrupalCamp Kyiv 2011
KEY
Testing with Jenkins, Selenium and Continuous Deployment
Selenium webdriver course content rakesh hansalia
Python selenium
Selenium Ide Tutorials
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Test Automation and Selenium
Selenium training course_content_3_days
Selenium Framework using Java | Selenium Tutorial | Selenium Training Online ...
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
Selenium
Selenium
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Maintainable UI Tests with Selenium and C#
Selenium rc ppt
Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011
Cross-browser unit testing JavaScript
Beyond the Release: CI That Transforms Organizations
Introduction to Automation Testing and Selenium overiew
Automated UI testing. Selenium. DrupalCamp Kyiv 2011
Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Testing with Jenkins, Selenium and Continuous Deployment
Ad

Viewers also liked (12)

PPTX
Automated Web Testing Using Selenium
PPTX
Automation Testing
PPTX
Selenium IDE
PDF
Automation Testing using Selenium
PPTX
Selenium
PPTX
Automated Testing for Websites With Selenium IDE
PDF
Selenium IDE
PPT
Selenium (1)
PPTX
Smarter ways to do selenium automation @ work, Selenium, automation
PPTX
Fin fest 2014 - Internet of Things and APIs
PPT
Web Test Automation with Selenium
PDF
Automation Testing using Selenium
Automated Web Testing Using Selenium
Automation Testing
Selenium IDE
Automation Testing using Selenium
Selenium
Automated Testing for Websites With Selenium IDE
Selenium IDE
Selenium (1)
Smarter ways to do selenium automation @ work, Selenium, automation
Fin fest 2014 - Internet of Things and APIs
Web Test Automation with Selenium
Automation Testing using Selenium
Ad

Similar to Selenium ui paradigm - DDD North 2 (20)

PPTX
What is Selenium Introduction to Selenium Testing.pptx
PPTX
test-automation-selenium-160216124839.pptx
PPTX
Selenium
PDF
selenium
PDF
white and grey modern website application education project group school pres...
PPTX
Step by step instructions to execute selenium automation testing
PPTX
#2 integration + ui tests
PPTX
Introduction to the Selenium_Session1.pptx
PPT
Selenium Primer
PPTX
Test Automation Using Selenium
PPT
Sakai10 Selenium Workshop
PPTX
Automated Web Testing With Selenium
PPT
BCS Selenium Workshop
PPTX
Selenium
PDF
Best Selenium course Online Training in Hyderabad Naresh-IT
PPTX
Architecting test automation using selenium
PPTX
Web UI Tests: Introduce UI tests using Selenium
PPTX
Basics of selenium containing features of selenium
DOCX
Software Testing Tools Training
ODP
Test Framework for Acne Selenium+Sahi
What is Selenium Introduction to Selenium Testing.pptx
test-automation-selenium-160216124839.pptx
Selenium
selenium
white and grey modern website application education project group school pres...
Step by step instructions to execute selenium automation testing
#2 integration + ui tests
Introduction to the Selenium_Session1.pptx
Selenium Primer
Test Automation Using Selenium
Sakai10 Selenium Workshop
Automated Web Testing With Selenium
BCS Selenium Workshop
Selenium
Best Selenium course Online Training in Hyderabad Naresh-IT
Architecting test automation using selenium
Web UI Tests: Introduce UI tests using Selenium
Basics of selenium containing features of selenium
Software Testing Tools Training
Test Framework for Acne Selenium+Sahi

More from Nathan Gloyn (7)

PPTX
Microservices - What I've learned after a year building systems
PPTX
You keep using the word agile, i do not think it means what you think it means
PPTX
No backend
PPTX
Inversion of control containers vs handrolled how they compare
PPTX
Is your code solid
PPTX
DDD North - Kanban what is it and how can it help
PPTX
You think you know agile
Microservices - What I've learned after a year building systems
You keep using the word agile, i do not think it means what you think it means
No backend
Inversion of control containers vs handrolled how they compare
Is your code solid
DDD North - Kanban what is it and how can it help
You think you know agile

Selenium ui paradigm - DDD North 2

Editor's Notes

  • #7: JavaScriptTestRunnerMost probably the first open source UI testing tool