The shift in the direction of cell platforms is a powerful development presently and Android is probably the most broadly adopted cell OS with an estimated market share above 80% in 2014. You need to naturally take a look at all of the apps developed for Android and a lot of open supply testing instruments and take a look at automation frameworks have been developed to realize this aim.
This text presents a listing of open supply Android testing instruments. For every device you’re going to get a small description of its options and tips that could extra assets that discusses the device extra in particulars. Be happy to recommend any extra open supply Android software program testing framework or useful resource that you simply suppose may be included on this article. Instruments are listed by alphabetical order. A listing of open supply Android testing instruments tasks that aren’t energetic can also be included on the finish of the article.
The open supply Android software program testing instruments talked about on this article are: Android Take a look at Package, AndroidX Take a look at Libraries, Appium, AssertJ Android, AutomationCore, Barista, calabash-android, Cortado, Detox, Fastbot-Android, Inexperienced Espresso, Macaca, Magneto, MATE, Mobly, Monkey, Robolectric, RoboSpock, Robotium, UIAutomator, Selendroid, Spoon, Take a look at Butler
Updates
April 11 2023: added AndroidX Take a look at Libraries, Detox, Fastbot-Android
September 30 2019: added AutomationCore, MATE, Spoon
November 30 2017: up to date Android Take a look at Package; eliminated AndroidJUnit4, NativeDriver; added Barista, Cortado, Inexperienced Espresso, Macaca, Mobly
January 24 2017: eliminated MonkeyTalk (acquired by Oracle); added AssertJ Android, Magneto, Take a look at Butler
AndroidX Take a look at Libraries
The AndroidX Take a look at Library gives an in depth framework for testing Android apps. This library gives a set of APIs that let you rapidly construct and run take a look at code on your apps, together with JUnit 4 and practical person interface (UI) exams. You’ll be able to run exams created utilizing these APIs from the Android Studio IDE or from the command line.
Web site: https://github.com/android/android-test
Android Take a look at Package
The Android Take a look at Package is the set of Google open supply testing instruments for Android. This library gives a set of APIs that let you rapidly construct and run take a look at code on your apps, together with JUnit 4 and practical person interface (UI) exams. You’ll be able to run exams created utilizing these APIs from the Android Studio IDE or from the command line.
Web site: https://google.github.io/android-testing-support-library/
Further assets
* Android software testing with the Android take a look at framework – Tutorial
* Espresso for Android is right here!
Appium
Appium is an open supply take a look at automation framework to be used with native and hybrid cell apps. Appium drives iOS and Android apps utilizing the WebDriver JSON wire protocol. Appium’ philosophy is that testing native apps shouldn’t require together with an SDK or recompiling your app. Appium goals to automate any cell app from any language and any take a look at framework, with full entry to back-end APIs and DBs from take a look at code. You’ll be able to write exams together with your favourite improvement instruments with the Selenium WebDriver API and language-specific consumer libraries.
Web site: http://appium.io/
Further assets
* Android UI testing with Appium
AssertJ Android
AssertJ Android is a set of AssertJ assertions geared towards testing Android. Writing exams is just not probably the most glamorous a part of creating an Android software but it surely is a useful one. Utilizing libraries like JUnit and AssertJ present a fantastic place to begin for writing exams. This library is an extension of AssertJ which goals to make it even simpler to check Android.
Web site: http://sq..github.io/assertj-android/
http://joel-costigliola.github.io/assertj/
AutomationCore
AutomationCore gives an entire testing platform for UI (Internet, iOS, Android, Win) and API testing. It gives a function wealthy and viable testing resolution for finish to finish testing. They’re designed to be quick, scalable, dependable and adaptable to any necessities for ever rising tasks. AutomationCore has a modular design. Every venture/part is handled as a module, totally able to interacting with each other. This enables for multi part and multiplatform testing. Eg. Create person via part A (API), validate in part B (internet), do motion in part C (Android), validate leads to part D (iOS)
Web site: https://github.com/autonomx/Autonomx
Barista
Barista makes creating UI take a look at sooner, simpler and extra predictable. Constructed on high of Espresso, it gives a easy an discoverable API, eradicating a lot of the boilerplate and verbosity of frequent Espresso duties. You and your Android workforce will write exams with no effort.
Web site: https://github.com/SchibstedSpain/Barista
Calabash-android
Calabash lets you write and execute. Calabash is an open supply device to write down automated acceptance exams of cell apps that helps Android and iOS native apps. Calabash consists of libraries that allow test-code to programmatically work together with native and hybrid apps. The interplay consists of plenty of end-user actions. Calabash may very well be in comparison with Selenium WebDriver. Nevertheless, you will need to understand that interacting with an internet app from a desktop laptop is vastly totally different than interacting with a local app utilizing a contact display. Calabash gives APIs which can be specialised to native apps working on contact display units.
Web site: http://calaba.sh/, https://github.com/calabash/calabash-android
Further assets
* A greater method to take a look at Android purposes utilizing Calabash
* Calabash Android: question language fundamentals
Cortado
Cortado is an open supply software program testing framework for Android that gives a layer of abstraction above Espresso, so it’s a bit simpler to make use of. As there may be Google Espresso beneath, you may nonetheless mess up your exams the identical method you’d when utilizing pure Espresso. Cortado simply provides you a bit nicer method to talk with Espresso.
Web site: https://github.com/blipinsk/cortado
Detox
Detox is an open supply grey field end-to-end testing and automation framework for cell apps. Excessive velocity native cell improvement requires us to undertake steady integration workflows, which implies our reliance on handbook QA has to drop considerably. Detox exams your cell app whereas it’s working in an actual gadget/simulator, interacting with it identical to an actual person. Essentially the most tough a part of automated testing on cell is the tip of the testing pyramid – E2E. The core drawback with E2E exams is flakiness – exams are normally not deterministic. We consider the one method to sort out flakiness head on is by shifting from black field testing to grey field testing. That’s the place Detox comes into play.
- Cross Platform: Write cross-platform end-to-end exams in JavaScript. At the moment helps iOS and Android.
- Debuggable: Fashionable async-await API permits breakpoints in asynchronous exams to work as anticipated.
- Robotically Synchronized: Stops flakiness on the core by monitoring asynchronous operations in your app.
- Made For CI: Execute your E2E exams on CI platforms like Travis CI, Circle CI or Jenkins with out grief.
- Runs on Units: Achieve confidence to ship by testing your app on a tool/simulator identical to an actual person (not but supported on iOS).
- Take a look at Runner Agnostic: Detox gives a set of APIs to make use of with any take a look at runner with out it. It comes with Jest integration out of the field.
Web sites: https://github.com/wix/Detox, https://wix.github.io/Detox/
Fastbot-Android
Fastbot-Android is an open supply model-based testing device for modeling GUI transitions to find app stability issues. It combines machine studying and reinforcement studying methods to help discovery in a extra clever method. Fastbot is suitable with a number of Android OS methods, together with unique Android, Android 5-13 and a variation of modified Andriod-based system by home producers. Inherited from unique Monkey, Fastbot permits for quick motion insertion as excessive as 12 actions per second. Knowledgeable system is provided with the power to customise deeply based mostly on wants from totally different enterprise strains. Fastbot is a model-based-testing device. Mannequin is construct through graph transition with the consideration of excessive reward alternative choice. Fastbot helps non-standard widgets by laptop imaginative and prescient methods comparable to YOLOv3, ocr and cv segmentation.
Web site: https://github.com/bytedance/Fastbot_Android
Inexperienced Espresso
Inexperienced Espresso is an open supply Android library that lets you run your acceptance exams written in Gherkin in your Android instrumentation exams utilizing the step definitions that you simply declare. Options are written utilizing the Gherkin language. Every function consists of a number of eventualities that describe totally different conditions so as to take a look at that function. Every situation consists of steps that can simulate person interactions with the UI.
Web site: https://github.com/mauriciotogneri/green-coffee
Macaca
Macaca is an open-source automation take a look at resolution for native, hybrid, cell internet and internet software on cell and desktop platforms. Macaca is “cross-platform”. It means you need to use the identical API to write down take a look at scripts, and similar take a look at scripts to check your apps working on units comparable to iOS, Android or desktops. Macaca doesn’t restrict what languages you’ll use to write down your exams.
Web site: https://github.com/alibaba/macaca
Magneto
Magneto is an open supply take a look at automation framework that enables to write down good and highly effective exams for Android apps. Magneto was constructed by Automation Engineers for Automation Engineers out of necessity for a cell centric take a look at automation framework that’s straightforward to setup, run and make the most of. Magneto is written in Python for Android units. It makes use of the uiautomator device through a Python wrapper and pytest as a take a look at framework. Magneto may be triggered from CLI, IDE and CI.
Web site: http://getmagneto.com/
MATE
MATE is an open supply device for automated android app testing that includes varied (genetic) algorithms. The venture is split into two elements: the MATE framework and unit exams for android managed on this repository and a server that runs on a number machine which is liable for some evaluation that may not be carried out by the instrumentation exams themselves.
Web site: https://github.com/mate-android-testing/mate
Mobly
Mobly is a Python-based take a look at framework that makes a speciality of supporting take a look at instances that require a number of units, advanced environments, or customized {hardware} setups. Mobly can assist many various kinds of units and gear, and it’s straightforward to plug your individual gadget or customized gear/service into Mobly.
Website online: https://github.com/google/mobly and https://github.com/google/mobly-bundled-snippets
Monkey
The Monkey is a open supply software program testing device developed by Google that runs in your emulator or gadget and generates pseudo-random streams of person occasions comparable to clicks, touches, or gestures, in addition to plenty of system-level occasions. You should utilize the Monkey to stress-test your apps in a random but repeatable method. The Monkey is a command-line device that that you may run on any emulator occasion or on a tool. It sends a pseudo-random stream of person occasions into the system, which acts as a stress take a look at on the appliance software program you might be creating. Monkey generates occasions and sends them to the system. It additionally watches the system beneath take a look at and appears for 3 circumstances, which it treats specifically.
Website online: http://developer.android.com/instruments/assist/monkey.html
Robolectric
Robolectric is a unit take a look at framework that de-fangs the Android SDK jar so you may test-drive the event of your Android app. Exams run contained in the JVM in your workstation in second. Robolectric handles inflation of views, useful resource loading, and many different stuff that’s carried out in native C code on Android units. This enables exams to do most issues you could possibly do on an actual gadget. It’s straightforward to offer our personal implementation for particular SDK strategies too. Robolectric enables you to run your exams in your workstation, or in your Steady Integration setting in a daily JVM, with out an emulator.
Website online: http://robolectric.org/
Further assets
* Higher Android Testing with Robolectric 2.0
Utilizing Robolectric for Android testing – Tutorial
RoboSpock
RoboSpock is an open supply take a look at framework for Android that gives a simple method of writing Conduct Pushed Growth (BDD) specs with Groovy language and helps the Google Guice library. It combines two foremost options within the space: Robolectric and Spock framework.
Website online: http://robospock.org/
Further assets
* RoboSpock – Conduct Pushed Growth (BDD) for Android
Robotium
Robotium is an Android take a look at automation framework that has full assist for native and hybrid purposes. Robotium makes it straightforward to write down highly effective and sturdy automated black-box UI exams for Android purposes. With the assist of Robotium, take a look at case builders can write perform, system and person acceptance take a look at eventualities, spanning a number of Android actions.
Website online: https://code.google.com/p/robotium/
Further assets
* Robotium – Testing Android Consumer Interface
* Android person interface testing with Robotium – Tutorial
UIAutomator
The UIAutomator testing framework enables you to take a look at your person interface (UI) effectively by creating automated practical UI take a look at instances that may be run towards your app on a number of units.
Website online: http://developer.android.com/instruments/assist/uiautomator/index.html
Further assets
* Automated Android Testing with UiAutomator
Selendroid
Selendroid is a take a look at automation framework that drives off the UI of Android native and hybrid purposes (apps) and the cell internet. Exams are written utilizing the Selenium 2 consumer. Selendroid can be utilized on emulators and actual units and may be built-in as a node into the Selenium Grid for scaling and parallel testing.
Web site: http://selendroid.io/
Further assets
* Cell Take a look at Automation with Selendroid
* Street to setup Selendroid and create first take a look at script of android software
* Up and working with: Selendroid
Spoon
Spoon goals to simplify testing Android purposes by distributing instrumentation take a look at execution and displaying the leads to a significant method. As an alternative of trying to be a brand new type of testing, Spoon makes current instrumentation exams extra helpful. Utilizing the appliance APK and instrumentation APK, Spoon runs the exams on a number of units concurrently. As soon as all exams have accomplished a static HTML abstract is generated with detailed details about every gadget and take a look at. Along with merely working instrumentation exams, Spoon has the power to snap screenshots at key factors throughout your exams that are then included within the output. This enables for visible inspection of take a look at executions throughout totally different units.
Web site: https://github.com/sq./spoon
Take a look at Butler
Take a look at Butler is an open supply Android testing device developed by LinkedIn. Take a look at Butler is a two-part venture. It consists of an Android library that your take a look at code can rely upon, in addition to a companion Android app apk that should be put in in your Android emulator earlier than utilizing Take a look at Butler. You’ll be able to construct the Take a look at Butler APK your self from supply, or obtain the binary from Bintray.
Web site: https://github.com/linkedin/test-butler
Further assets
* Open Sourcing Take a look at Butler, Dependable Android Testing, at Your Service
* “Your Espresso, Sir!”, or Stepping Up Your UI Exams With Take a look at Butler
Some discontinued tasks of Android testing instruments
A listing of some seemingly discontinued open supply tasks (or no less than not up to date in current months) for Android testing instruments that you simply would possibly wish to verify… and possibly taking again to life.
Emmagee
Emmagee is a sensible, useful efficiency take a look at device for specified Android App, which may monitor CPU, reminiscence and community site visitors. Moreover, it additionally gives a number of cool options comparable to customizing interval of gathering information, rendering real-time course of standing in a floating window, and way more.
Website online: https://github.com/kevinkong/Emmagee
NativeDriver
NativeDriver is an implementation of the WebDriver API that drives of the UI of a local software reasonably than an internet software.
Website online: https://github.com/sonixlabs/nativedriver
Sirocco
Scirocco is an open supply Utility testing device from Sonix. It is possible for you to to entry obligatory testing units from Eclipse. As an alternative of hand operation, Scirocco gives automated Android software’s testing functionalities. It helps Google NativeDriver and AndroidDriver as foremost testing library.
Website online: https://github.com/sonixlabs/scirocco-webdriver