Low-level android automation with adb

When we speak about Android automation, the first thing that comes to mind is Appium, however, what if Appium doesn't serve all your Android automation needs, at least not in the most efficient way?

When I was asked to create a test automation framework for our android service (no GUI), I needed to choose the right tool for the mission. After several weeks of researching many options (both commercial and open source). I realized that ADB is my best call because of the following reasons:
• ADB provides a faster to run solution for controlling an android device
• ADB is in a lower level of Android OS therefore it's more flexible
• ADB is going through less code components (like appium client, appium server etc..) and as a result is more reliable

In this tutorial I will share my journey towards deciding to use Android Debug Bridge when it comes to non-gui android application and how I have implemented my choice.
After this tutorial, you will have a better understanding of what is ADB, how it works, and how you can start and apply automation for the Low-Level layer of Android OS with ADB and Python.

 
2 favorite thumb_down thumb_up 1 comment visibility_off  Remove from Watchlist visibility  Add to Watchlist
 

Learning Outcome

After this tutorial, you will have a better understanding of what is ADB, how it works, and how you can start and apply automation for the Low-Level layer of Android OS with ADB and Python.

Target Audience

anyone who want to expand his knowledge with android automation and adb

schedule Submitted 5 days ago

Comments Subscribe to Comments

comment Comment on this Submission
  • Srinivasan Sekar
    By Srinivasan Sekar  ~  2 days ago
    reply Reply

    Hi Tomer Cohen,

     

    Thank you so much for your submission. The topic seems interesting to me. Can you clarify us with a rough draft of presentation on what are the low-level tasks that you have achieved through ADB and also would like to understand what are the areas do you think appium doesn't suffice in your needs?

    Break up of detailed agenda will also be helpful in this case.

    Regards,

    Srini


  • Liked Justin Ison
    keyboard_arrow_down

    Justin Ison - Appium Native Application Crawler

    Justin Ison
    Justin Ison
    Sr. Software Engineer
    Microsoft
    schedule 1 month ago
    Sold Out!
    45 Mins
    Demonstration
    Beginner

    In today’s agile world the time to market is becoming increasingly shorter. There is a constant desire to release ASAP to keep ahead of the competition and to please users with updated/new features. Because of this, we have less time to fully do manual and exploratory testing of our apps. Especially, when you consider all the combinations of OS's, Locales, Accessibility, Orientations & Resolutions apps support. Running anywhere from 1 to 100's of Appium crawler bots (covering all of those combinations) at once we can discover more issues quickly and efficiently without having to write a line of code.

    UI Automation also has its limitations as it only tests for expected results. Crawler bots test the unexpected, by collecting metadata such as logs, app strings, screenshots, memory and reporting back it’s finding for review so we can test all these combinations quickly and more efficiently. In this talk, I will go over the current challenges we face in today's development world, why we need more tools to help us keep pace, and cover how you can build your own Appium crawler.

    I've open sourced this tool and is available here for everyone to use: https://github.com/isonic1/Appium-Native-Crawler

  • Liked Eran Kinsbruner
    keyboard_arrow_down

    Eran Kinsbruner / Uzi Eilon - Future-Proofing Testers in the Age of AI, ML, and Bots

    45 Mins
    Talk
    Advanced

    We're all hearing the buzzwords of AI, machine learning, chatbots, and next-generation testing. Does this mean that the days of traditional testing as we know and practice it are over? Eran Kinsbruner doesn't think so. Join him to learn about the clear transformation happening toward smarter testing techniques and tools. These approaches will drive better pipeline efficiency and release velocity with high quality, and Eran thinks this means good things for the testing practice and practitioners. You'll discover the key trends that are happening around AI, machine learning, and bots in the web and mobile landscapes, and get the ability to identify some early adopters who are taking the lead in these domains. Learn some key requirements and skills that are required for a test engineer to shift toward the future of automation, as well as the changes testers will need to undergo in order to become future leaders in this space.

  • Liked Bruno Alassia
    keyboard_arrow_down

    Bruno Alassia - Go beyond the software, automate hardware scenarios on Android Emulators

    Bruno Alassia
    Bruno Alassia
    Sr. Software Engineer
    SauceLabs
    schedule 1 month ago
    Sold Out!
    20 Mins
    Talk
    Intermediate

    Explore the limits Appium can help you achieve to control the Android Emulator behavior. Automate network emulation, receive fake SMS and phone calls, change the battery states and levels and a lot more, all using real-life test cases. What happens to my app if I lost connection? How does my UI react to an incoming phone call? And more.

  • Liked Jonah Stiennon
    keyboard_arrow_down

    Jonah Stiennon - Find Elements By Accessibility Id

    Jonah Stiennon
    Jonah Stiennon
    Partner
    Cloud Grey
    schedule 1 day ago
    Sold Out!
    45 Mins
    Talk
    Intermediate

    You'll find many written sources which assert that AccessibilityId is the preferred selector to use for finding elements, but why is this the case? What's wrong with XPath?

    In this talk, we will discuss Accessibility Id's in depth. How Appium uses them to find elements on iOS, Android, and web, and how developers add these Id's to apps. We will specifically focus on the performance impact of using XPath selectors instead of Accessibility Id's.

    We will demonstrate techniques we can use to improve the performance of XPath selectors if accessibility Id's are missing, and discuss strategies for convincing managers and app developers to add accessibility Id's to the apps we automate.

  • Liked Jonah Stiennon
    keyboard_arrow_down

    Jonah Stiennon - All Desired Capabilities

    Jonah Stiennon
    Jonah Stiennon
    Partner
    Cloud Grey
    schedule 1 day ago
    Sold Out!
    45 Mins
    Talk
    Intermediate

    Appium has so many desired capabilities! How many exactly? Let's count!

    Join Appium contributor Jonah Stiennon as he iterates through every desired capability supported by Appium.

    Many special behaviors and specific workarounds are made available only through desired capabilities. Often the key to selecting an element reliably, launching an app, or avoiding a timeout, is picking the right set of desired capabilities. There's so many that testers don't get the chance to sit down and become acquainted with them all.

    There's too many to easily memorize and documentation can be sparse. Jonah will introduce novel ways to classify, visualize, and organize all of the desired capabilities, making it easier to find ones which can be useful.

  • Liked Rajdeep
    keyboard_arrow_down

    Rajdeep - There is more in Espresso Driver's Element than you think

    Rajdeep
    Rajdeep
    Sr. Test Automation Engineer
    Badoo
    schedule 3 days ago
    Sold Out!
    45 Mins
    Demonstration
    Intermediate

    Appium is undisputed champion when it comes to mobile automation. One of the reasons behind this is the continuous improvement done by the community and the hard-work of Maintainers. The recent release of espresso-driver is yet another example of such improvement. There are a lot of capabilities in this driver, one of which is the ability to call platform methods on elements without modifying anything in Application under test. This opens the door of infinite possibilities. What it means is, if the Android platform supports some actions or properties on an element, then Appium will support it out of the box.
    For an automation engineer, that's a very powerful addition. I was fortunate enough to work on this feature and would like to showcase what are the various tricky cases where this feature can be applied. There will be real examples shown with a sample android app. I will also introduce one more small bonus feature at the end, about flashing elements on screen ;)

  • Liked Bijoya Chatterjee
    keyboard_arrow_down

    Bijoya Chatterjee - Trust Issues with UI Automation

    45 Mins
    Talk
    Beginner

    UI Test Automation is notorious for stability issues. UI automation is almost synonymous with "Flaky Test". We discuss taking a proactive strategy towards test automation flakiness as opposed to a reactive approach where we look at failures and then decide the course of action. How can we in the test automation community use and develop tools that helps eliminate flakiness and also identifies flaky tests before they are not just run but even before they are merged. How do we create these tools in a service model that plugs into our Continuous Integration pipelines ?