Upgrade to Pro — share decks privately, control downloads, hide ads and more …

UJUG - Selenium

UJUG - Selenium

How to effectively utilize the Java testing tool chain to successfully execute tests on Sauce Labs

Code Repo: https://github.com/saucelabs/java-sauce-example

Sebastian Tiedtke

March 20, 2014
Tweet

More Decks by Sebastian Tiedtke

Other Decks in Programming

Transcript

  1. Functional Browser Testing How to effectively utilize the Java testing

    tool chain to successfully execute tests on Sauce Labs Sebastian Tiedtke, @sourishkrout
  2. What’s Selenium? ! ! ! Unit Testing isn’t always enough

    Functional Testing Don’t repeat yourself Cross-browser One protocol / API to rule ‘em all Mimic user interactions ! Selenium RC first generation WebDriver (Selenium 2)
  3. What’s WebDriver? ! ! WebDriver JSON Wire Protocol One protocol

    / API to rule ‘em all W3C Draft: h>p://www.w3.org/TR/webdriver/ Native Java bindings amongst others User interactions beyond the Javascript sandbox Fires OS-native events ! AndroidDriver, ChromeDriver, EventFiringWebDriver, FirefoxDriver, HtmlUnitDriver, InternetExplorerDriver, IPhoneDriver, PhantomJSDriver, RemoteWebDriver, SafariDriver
  4. Selenium WebDriver API ! ! ! ! Basics: • Actions

    • Assertions • Locator Strategies (Id, Name, ClassName, CSS, XPath, Link Text, TagName) ! Simulates user actions such as: • Click • Type
  5. Automation with Appium ! Appium is an open source test

    automation framework for use with native and hybrid mobile apps. It drives iOS and Android apps using the WebDriver JSON wire protocol. 

  6. Challenges ! ! ! ! Real browser are “slow” Multitude

    of platforms Infrastructure maintenance headaches User interactions are complex Small and concise test cases Start with smoke tests Isolation Latency Mock all the things
  7. Sauce Labs to the rescue! ! ! ! ! !

    ! ! Rich Test Dashboard + REST API access Fast Diagnosis Screenshots & Screencasts Various Logs to Aid Debugging Pristine VMs (Security) + Encrypted Tunnel Secure Temporary Storage for Apps
  8. Demo + Live Coding ! ! ! ! ! !

    ! ! ! h>ps://github.com/saucelabs/java-­‐sauce-­‐example
  9. Beyond Test Cases and Suites ! ! ! Continuous Integration:

    • Jenkins • Travis • Bamboo • Strider ! ! h>ps://travis-­‐ci.org/saucelabs/java-­‐sauce-­‐example