Selenium - what it is and what you can do with it
Upcoming SlideShare
Loading in...5
×
 

Selenium - what it is and what you can do with it

on

  • 245 views

An introduction to Selenium, a technology for testing web sites. I give an overview of its ecosystem and also show you how to create a simple CI system based on Selenium Builder, GitHub, Travis and ...

An introduction to Selenium, a technology for testing web sites. I give an overview of its ecosystem and also show you how to create a simple CI system based on Selenium Builder, GitHub, Travis and Sauce Labs.

Statistics

Views

Total Views
245
Views on SlideShare
245
Embed Views
0

Actions

Likes
1
Downloads
2
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Selenium - what it is and what you can do with it Selenium - what it is and what you can do with it Presentation Transcript

  • Selenium what it is and what you can do with it
  • Selenium ● Web testing framework ● A faster way to see if your site works ● Real browsers for fidelity Test Server Browser
  • Applications ● Cross-browser testing ● Continuous integration ● (Scraping & automation)
  • Ecosystem ● ● ● ● Two versions Many language bindings Two development environments Many playback backends
  • Selenium IDE Selenium 1 Test Selenium Builder Selenium 1 Code Selenium 2 Code Builder JSON Selenium 1 APIs Webdriver APIs Se Interpreter HTML Ghost Selenium Server IE Firefox Chrome Opera Android etc.
  • Selenium 1 vs 2 ● v 1 is a list of testing steps ● v 2 is an API for remote-controlling browsers
  • Selenium 1 Tests ● Sequence of test steps ● “Go to this page, click on this link, does this text appear?” ● Stored as “Selenese” table or code
  • Selenium 2 / Webdriver APIs ● Write code to control the browser ● Python, Java, Ruby, Perl, PHP, C#, node, Groovy, etc.
  • Locators are for finding stuff ● Locators refer to page elements ● Multiple strategies: id, class, text, xpath… ● Ideally robust to minor page changes
  • Playback fidelity is hard! ● Javascript is everywhere: you can’t test a page just by looking at the HTML ● Want to run tests quickly but waits needed ● Reliable locators can be hard ● CSS rollovers, element visibility, etc.
  • No silver bullet blah blah blah ● ● ● ● Selenium uses real browsers for fidelity Implicit waits sometimes work Write clean, testable pages 80/20 automated/manual is still nice
  • Getting started with Selenium 2 ● Get language bindings ● Write your first test ● Run your first test
  • demo
  • Builder+GitHub+Travis+Sauce = CI ● ● ● ● Record tests with Selenium Builder Store them on GitHub in the project repo Use Travis to drive test runs on commit Use Sauce Labs’ Selenium servers
  • demo http://sauceio.com/index.php/2013/03/building-a-ci-system-using-selenium-builder-github-travis-and-sauce-labs/
  • Substitutions ● Builder: IDE or hand-coded scripts ● Travis: another CI system, e.g Jenkins ● Sauce OnDemand: your own infrastructure or another provider like TestingBot
  • That’s it! ● Questions? ● Follow me on @zarkonnen_com