Slide 1

Slide 1 text

Promo  code:  UJUG_2014   saucelabs.com/signup

Slide 2

Slide 2 text

Functional Browser Testing How to effectively utilize the Java testing tool chain to successfully execute tests on Sauce Labs Sebastian Tiedtke, @sourishkrout

Slide 3

Slide 3 text

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)

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

Selenium WebDriver API ! ! ! ! Basics: • Actions • Assertions • Locator Strategies (Id, Name, ClassName, CSS, XPath, Link Text, TagName) ! Simulates user actions such as: • Click • Type

Slide 6

Slide 6 text

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. 


Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

Native Dev Tools ! ! ! ! ! ! ! ! ! ! ! !

Slide 10

Slide 10 text

Demo + Live Coding ! ! ! ! ! ! ! ! ! h>ps://github.com/saucelabs/java-­‐sauce-­‐example

Slide 11

Slide 11 text

Beyond Test Cases and Suites ! ! ! Continuous Integration: • Jenkins • Travis • Bamboo • Strider ! ! h>ps://travis-­‐ci.org/saucelabs/java-­‐sauce-­‐example

Slide 12

Slide 12 text

Thank you! ! ! http://saucelabs.com/selenium ! @sourishkrout