O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×

Mobile UI Testing using Appium and Docker

Carregando em…3

Confira estes a seguir

1 de 39 Anúncio

Mais Conteúdo rRelacionado

Diapositivos para si (20)

Semelhante a Mobile UI Testing using Appium and Docker (20)


Mais recentes (20)


Mobile UI Testing using Appium and Docker

  1. 1. Mobile UI testing For Android using Appium and Docker MOATAZ NABIL 12.01.2018 WUZZUF TRAINING CENTER Cairo Testing Meetup
  2. 2. About Me Software Engineer in Test || at Zalando SE Berlin , Germany @moatazeldebsy
  3. 3. Our Sponsorship
  4. 4. Table of contents • Introduction • 10 Tools Every Mobile Tester Should Know • What is Appium? • Appium Architecture • Types of apps to be tested • What is Docker? • How Does it work ? • Why combine these technologies? • Run UI tests using DockerAndroid and Appium
  5. 5. Introduction
  6. 6. Introduction  Why we develop apps for mobile devices ?  Why do we have to test apps?
  7. 7. Why we develop apps for mobile devices ?  Since 2014 there are more mobile users than desktop ones  People buy more mobile devices than non mobile ones
  8. 8. Why do we have to test apps?  90 % of the time using apps vs. 10% using the browser.  Different OS (and also the same OS works different depending on the version …).  Native VS. Hybrid apps.
  9. 9. 10 Tools Every Mobile Tester Should Know
  10. 10. What is Appium?
  11. 11. What is Appium? • Appium is a powerful framework that help us test our mobile applications. • It supports both native and hybrid applications. • It is open-source and cross-platform, giving us the ability to run test against multiple platforms with the same API, avoiding code refactoring. • It’s drive iOS , Android and Windows apps using the WebDriver protocol
  12. 12. Appium Rules • You shouldn't have to recompile or modify it in any way in order to automate it. • You shouldn’t be locked into a specific language or framework to write and run your tests. • A mobile automation framework shouldn’t reinvent the wheel when it comes to automation APIs • A mobile automation framework should be open source , in spirit and practice as well as in name!
  13. 13. Appium Architecture
  14. 14. Appium Architecture
  15. 15. Types of apps to be tested
  16. 16. Types of apps to be tested
  17. 17. Types of apps to be tested
  18. 18. Types of apps to be tested
  19. 19. Appium Requirements for Android
  20. 20. Appium Requirements  JDK  Android SDK  AVD (Android Virtual Devices)  Appium Server (Appium Desktop)  Appium java clients bindings
  21. 21. Appium Desktop The new tool for Appium Server and Inspector
  22. 22. Appium Desktop  Appium Desktop is an open source app for Mac, Windows, and Linux which gives you the power of the Appium automation server in a beautiful and flexible UI. It is a combination of a few Appium-related tools:  A graphical interface for the Appium Server. You can set options, start/stop the server, see logs, etc... You also don't need to use Node/NPM to install Appium, as the Node runtime comes bundled with Appium Desktop.  An Inspector that you can use to look at your app's elements, get basic information about them, and perform basic interactions with them. This is useful as a way to learn about Appium or as a way to learn about your app so you can write tests for it.
  23. 23. What is Docker ?
  24. 24. What is Docker ?  You may think of Docker as a virtual machine, only much lighter.  Docker is an open platform for developing and running applications. With this tool, you can create ‘containers’ that provide packages and commands isolated from your OS. This allows you to run more than one container at the same time on a single machine.
  25. 25.  Containers are lightweight because they don’t need the extra load of a hypervisor, but run directly within the host machine’s kernel. This makes Docker more compatible than virtual machines.
  26. 26. Live Demo Pull your first Docker image docker run –it hello-world
  27. 27. How Does it work?
  28. 28. How Does Docker works ?
  29. 29. Why combine these technologies?  If you are a QA and have nothing to do with development, setting the environment to run the app (and the tests, which are our real goal) may be tedious or complicated. For android, you must have an specific java version, an android sdk, etc. And all that having in mind your OS and architecture.  That’s when Docker come to the rescue! a docker image to avoid these inconveniences.  You only need Docker previously installed. https://docs.docker.com/engine/installation/
  30. 30. Run UI tests using DockerAndroid and Appium
  31. 31. What is Docker-Android A docker image built to be used for everything related to mobile website testing and Android project
  32. 32. Goals Run UI test for mobile websites Run UI tests for Android Applications
  33. 33. How Does It Work Start docker-android $ docker run --privileged -d -p 6080:6080 -p 4723:4723 -e DEVICE="Samsung Galaxy S6" -e APPIUM=True -e CONNECT_TO_GRID=True -e APPIUM_HOST="" -e APPIUM_PORT=4723 -e SELENIUM_HOST="" -e SELENIUM_PORT=4444 -- name android-container butomo1989/docker-android-x86-7.1.1 Start it with Appium server and connect to selenium grid $ docker run --privileged -d -p 6080:6080 -e DEVICE="Samsung Galaxy S6" --name android- container butomo1989/docker-android-x86-7.1.1
  34. 34. Live Demo Let’s Play with Docker-android and Appium Visit https://github.com/butomo1989/docker-android
  35. 35. Key Advantages noVNC Emulator for different devices / skins, such as Samsung Galaxy S6, LG Nexus 4, HTC Nexus One and more. Ability to connect to Selenium Grid Open source with more features coming (video recording and logs, monkey test and support real devices with screen mirroring)
  36. 36. Questions
  37. 37. Thank You @moatazeldebsy Email: moatazeldebsy@gmail.com Skype: Moataz.nabil2014