SlideShare uma empresa Scribd logo
1 de 25
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?

Mais conteúdo relacionado

Mais procurados

Selenium webdriver course content rakesh hansalia
Selenium webdriver course content rakesh hansaliaSelenium webdriver course content rakesh hansalia
Selenium webdriver course content rakesh hansalia
Rakesh Hansalia
 
Selenium Ide Tutorials
Selenium Ide TutorialsSelenium Ide Tutorials
Selenium Ide Tutorials
gueste1e4db
 
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
Applitools
 
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Simplilearn
 
Selenium rc ppt
Selenium rc pptSelenium rc ppt
Selenium rc ppt
mindqqa
 
Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011
Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011
Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011
camp_drupal_ua
 
Cross-browser unit testing JavaScript
Cross-browser unit testing JavaScriptCross-browser unit testing JavaScript
Cross-browser unit testing JavaScript
Alan Parkinson
 
Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Automated UI testing.Selenium.DrupalCamp Kyiv 2011Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Automated UI testing.Selenium.DrupalCamp Kyiv 2011
camp_drupal_ua
 

Mais procurados (20)

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

Destaque

Automated Web Testing Using Selenium
Automated Web Testing Using SeleniumAutomated Web Testing Using Selenium
Automated Web Testing Using Selenium
昱劭 劉
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
Fizah Ali
 
Selenium (1)
Selenium (1)Selenium (1)
Selenium (1)
onlinemindq
 
Smarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automationSmarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automation
RIA RUI Society
 

Destaque (12)

Automated Web Testing Using Selenium
Automated Web Testing Using SeleniumAutomated Web Testing Using Selenium
Automated Web Testing Using Selenium
 
Automation Testing
Automation TestingAutomation Testing
Automation Testing
 
Selenium IDE
Selenium IDESelenium IDE
Selenium IDE
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Automated Testing for Websites With Selenium IDE
Automated Testing for Websites With Selenium IDEAutomated Testing for Websites With Selenium IDE
Automated Testing for Websites With Selenium IDE
 
Selenium IDE
Selenium IDESelenium IDE
Selenium IDE
 
Selenium (1)
Selenium (1)Selenium (1)
Selenium (1)
 
Smarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automationSmarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automation
 
Fin fest 2014 - Internet of Things and APIs
Fin fest 2014 - Internet of Things and APIsFin fest 2014 - Internet of Things and APIs
Fin fest 2014 - Internet of Things and APIs
 
Web Test Automation with Selenium
Web Test Automation with SeleniumWeb Test Automation with Selenium
Web Test Automation with Selenium
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
 

Semelhante a Selenium ui paradigm - DDD North 2

#2 integration + ui tests
#2 integration + ui tests#2 integration + ui tests
#2 integration + ui tests
eleksdev
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
Nikhil Kapoor
 
Sakai10 Selenium Workshop
Sakai10 Selenium WorkshopSakai10 Selenium Workshop
Sakai10 Selenium Workshop
coreyjack
 

Semelhante a Selenium ui paradigm - DDD North 2 (20)

What is Selenium Introduction to Selenium Testing.pptx
What is Selenium Introduction to Selenium Testing.pptxWhat is Selenium Introduction to Selenium Testing.pptx
What is Selenium Introduction to Selenium Testing.pptx
 
test-automation-selenium-160216124839.pptx
test-automation-selenium-160216124839.pptxtest-automation-selenium-160216124839.pptx
test-automation-selenium-160216124839.pptx
 
Selenium
SeleniumSelenium
Selenium
 
selenium
selenium selenium
selenium
 
white and grey modern website application education project group school pres...
white and grey modern website application education project group school pres...white and grey modern website application education project group school pres...
white and grey modern website application education project group school pres...
 
Step by step instructions to execute selenium automation testing
Step by step instructions to execute selenium automation testingStep by step instructions to execute selenium automation testing
Step by step instructions to execute selenium automation testing
 
#2 integration + ui tests
#2 integration + ui tests#2 integration + ui tests
#2 integration + ui tests
 
Selenium Primer
Selenium PrimerSelenium Primer
Selenium Primer
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
 
Sakai10 Selenium Workshop
Sakai10 Selenium WorkshopSakai10 Selenium Workshop
Sakai10 Selenium Workshop
 
Automated Web Testing With Selenium
Automated Web Testing With SeleniumAutomated Web Testing With Selenium
Automated Web Testing With Selenium
 
BCS Selenium Workshop
BCS Selenium WorkshopBCS Selenium Workshop
BCS Selenium Workshop
 
Selenium
SeleniumSelenium
Selenium
 
Architecting test automation using selenium
Architecting test automation using seleniumArchitecting test automation using selenium
Architecting test automation using selenium
 
Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium
 
Software Testing Tools Training
Software Testing Tools TrainingSoftware Testing Tools Training
Software Testing Tools Training
 
Test Framework for Acne Selenium+Sahi
Test Framework for Acne Selenium+SahiTest Framework for Acne Selenium+Sahi
Test Framework for Acne Selenium+Sahi
 
QSpiders - Automation using Selenium
QSpiders - Automation using SeleniumQSpiders - Automation using Selenium
QSpiders - Automation using Selenium
 
Introduction to Selenium
Introduction to SeleniumIntroduction to Selenium
Introduction to Selenium
 
What is selenium
What is seleniumWhat is selenium
What is selenium
 

Mais de Nathan Gloyn

Mais de Nathan Gloyn (7)

Microservices - What I've learned after a year building systems
Microservices - What I've learned after a year building systemsMicroservices - What I've learned after a year building systems
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
You keep using the word agile, i do not think it means what you think it meansYou keep using the word agile, i do not think it means what you think it means
You keep using the word agile, i do not think it means what you think it means
 
No backend
No backendNo backend
No backend
 
Inversion of control containers vs handrolled how they compare
Inversion of control containers vs handrolled   how they compareInversion of control containers vs handrolled   how they compare
Inversion of control containers vs handrolled how they compare
 
Is your code solid
Is your code solidIs your code solid
Is your code solid
 
DDD North - Kanban what is it and how can it help
DDD North - Kanban what is it and how can it helpDDD North - Kanban what is it and how can it help
DDD North - Kanban what is it and how can it help
 
You think you know agile
You think you know agileYou think you know agile
You think you know agile
 

Selenium ui paradigm - DDD North 2

Notas do Editor

  1. JavaScriptTestRunnerMost probably the first open source UI testing tool