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

Mobile Web: to the Desktop!

Mobile Web: to the Desktop!

Alexander Bayandin

November 08, 2016
Tweet

More Decks by Alexander Bayandin

Other Decks in Technology

Transcript

  1. Fun fact ✦ I’m Russian ✦ My name is “Alexander”

    ✦ My name in passport is spelled as “Aleksandr”
  2. Fun fact ✦ I’m Russian ✦ My name is “Alexander”

    ✦ My name in passport is spelled as “Aleksandr” ✦ You can call me “Sasha”
  3. We’re 5 Platforms 3 TC agents 329m Users 47 Languages

    350k Messages / day 10m Photo / day
  4. We’re 5 Platforms 3 TC agents 329m Users 47 Languages

    350k Messages / day 10m Photo / day
  5. Platforms ✦ Desktop Web ✦ iOS ✦ Android ✦ Windows

    Phone ✦ Mobile Web Mobile Test Automation
  6. Platforms ✦ Desktop Web ✦ iOS ✦ Android ✦ Windows

    Phone ✦ Mobile Web Mobile Test Automation
  7. Platforms ✦ Desktop Web ✦ iOS ✦ Android ✦ Windows

    Phone ✦ Mobile Web Mobile Test Automation Me
  8. Platforms ✦ Desktop Web ✦ iOS ✦ Android ✦ Windows

    Phone ✦ Mobile Web Mobile Test Automation Me Viktar
  9. Basic overview ✦ We do cross-platform test automation (Android, iOS,

    Mobile Web & Windows Phone) ✦ We use Ruby and Cucumber
  10. Basic overview ✦ We do cross-platform test automation (Android, iOS,

    Mobile Web & Windows Phone) ✦ We use Ruby and Cucumber ✦ We use Calabash, Appium, Selenium & Winium.Mobile
  11. Basic overview ✦ We do cross-platform test automation (Android, iOS,

    Mobile Web & Windows Phone) ✦ We use Ruby and Cucumber ✦ We use Calabash, Appium, Selenium & Winium.Mobile ✦ And TeamCity
  12. Basic overview ✦ We do cross-platform test automation (Android, iOS,

    Mobile Web & Windows Phone) ✦ We use Ruby and Cucumber ✦ We use Calabash, Appium, Selenium & Winium.Mobile ✦ And TeamCity ✦ We’re cool
  13. A long time ago ✦ Mobile Web — 3rd platform

    covered by automation ✦ Running tests on real Android devices
  14. A long time ago ✦ Mobile Web — 3rd platform

    covered by automation ✦ Running tests on real Android devices ✦ Use ChromeDriver through Appium
  15. A long time ago ✦ Mobile Web — 3rd platform

    covered by automation ✦ Running tests on real Android devices ✦ Use ChromeDriver through Appium ✦ All 300 tests take about 5 hours (parallel run on 4 devices)
  16. A long time ago ✦ Mobile Web — 3rd platform

    covered by automation ✦ Running tests on real Android devices ✦ Use ChromeDriver through Appium ✦ All 300 tests take about 5 hours (parallel run on 4 devices)
  17. A long time ago ✦ Mobile Web — 3rd platform

    covered by automation ✦ Running tests on real Android devices ✦ Use ChromeDriver through Appium ✦ All 300 tests take about 5 hours (parallel run on 4 devices)
  18. Tests speed up (part 1) ✦ Make Appium Ruby library

    compatible with Selenium ✦ Fix tests (keyboard / photo upload / desktop Chrome is fast / animations)
  19. Tests speed up (part 1) ✦ Make Appium Ruby library

    compatible with Selenium ✦ Fix tests (keyboard / photo upload / desktop Chrome is fast / animations)
  20. Tests speed up (part 1) Custom JS script ✦ Make

    Appium Ruby library compatible with Selenium ✦ Fix tests (keyboard / photo upload / desktop Chrome is fast / animations)
  21. Tests speed up (part 1) ✦ Make Appium Ruby library

    compatible with Selenium ✦ Fix tests (keyboard / photo upload / desktop Chrome is fast / animations)
  22. Tests speed up (part 1) Use standard Selenium method ✦

    Make Appium Ruby library compatible with Selenium ✦ Fix tests (keyboard / photo upload / desktop Chrome is fast / animations)
  23. Tests speed up (part 1) ✦ Make Appium Ruby library

    compatible with Selenium ✦ Fix tests (keyboard / photo upload / desktop Chrome is fast / animations)
  24. Tests speed up (part 1) More waits ✦ Make Appium

    Ruby library compatible with Selenium ✦ Fix tests (keyboard / photo upload / desktop Chrome is fast / animations)
  25. Tests speed up (part 1) ✦ Make Appium Ruby library

    compatible with Selenium ✦ Fix tests (keyboard / photo upload / desktop Chrome is fast / animations)
  26. Tests speed up (part 1) ✦ Make Appium Ruby library

    compatible with Selenium ✦ Fix tests (keyboard / photo upload / desktop Chrome is fast / animations) Use setTimeout instead of requestAnimationFrame
  27. Tests speed up (part 1) ✦ Make Appium Ruby library

    compatible with Selenium ✦ Fix tests (keyboard / photo upload / desktop Chrome is fast / animations) ✦ Launch Selenium Grid on each TeamCity agent before tests (10 Chromes)
  28. Tests speed up (part 2) ✦ Move Selenium to Docker

    containers ✦ Run more Selenium Grid nodes
  29. Tests speed up (part 2) ✦ Move Selenium to Docker

    containers ✦ Run more Selenium Grid nodes ✦ Parallelise in more threads
  30. Run tests locally (Android) ✦ Install Ruby Version Manager (RVM)

    ✦ Install Bundler ✦ `bundle install` ✦ Install Node.js
  31. Run tests locally (Android) ✦ Install Ruby Version Manager (RVM)

    ✦ Install Bundler ✦ `bundle install` ✦ Install Node.js ✦ `npm install`
  32. Run tests locally (Android) ✦ Install Ruby Version Manager (RVM)

    ✦ Install Bundler ✦ `bundle install` ✦ Install Node.js ✦ `npm install` ✦ Install Java
  33. Run tests locally (Android) ✦ Install Ruby Version Manager (RVM)

    ✦ Install Bundler ✦ `bundle install` ✦ Install Node.js ✦ `npm install` ✦ Install Java ✦ Install Android SDK
  34. Run tests locally (Android) ✦ Install Ruby Version Manager (RVM)

    ✦ Install Bundler ✦ `bundle install` ✦ Install Node.js ✦ `npm install` ✦ Install Java ✦ Install Android SDK
  35. Run tests locally (Selenium) ✦ Install Ruby Version Manager (RVM)

    ✦ Install Bundler ✦ `bundle install` ✦ Install Java
  36. Run tests locally (Selenium) ✦ Install Ruby Version Manager (RVM)

    ✦ Install Bundler ✦ `bundle install` ✦ Install Java ✦ Download Selenium and ChromeDriver
  37. Run tests locally (Selenium) ✦ Install Ruby Version Manager (RVM)

    ✦ Install Bundler ✦ `bundle install` ✦ Install Java ✦ Download Selenium and ChromeDriver ✦ `java -jar selenium.jar -Dwebdriver.chrome.driver=./chromedriver`
  38. Run tests locally (Selenium) ✦ Install Ruby Version Manager (RVM)

    ✦ Install Bundler ✦ `bundle install` ✦ Install Java ✦ Download Selenium and ChromeDriver ✦ `java -jar selenium.jar -Dwebdriver.chrome.driver=./chromedriver` ✦ `cucumber -p web_badoo …` # Run test itself
  39. ------ LOCAL RUN: ------ docker-compose run -e APP=badoo -e BMA_SERVER=QA

    -e WEB_URL=MW-3287 test own_profile.feature:24 ------------------------
  40. Results 3 TC agents 3 TC agents 700+ tests 30

    runs / day 100+ Selenium nodes TC agents 30 min / run
  41. Results ✦ No manual regression testing (No boring stuff) ✦

    Developers & QA run tests locally ✦ Everyday releases
  42. Some future plans ✦ Run tests on iOS Safari /

    Windows Phone Browser ✦ Truly headless Chrome
  43. Some future plans ✦ Run tests on iOS Safari /

    Windows Phone Browser ✦ Truly headless Chrome ✦ Better app debugging with tests (taking HAR, for example)