Appium
Appium is an open source mobile testing tool for iOS and Android that can be used to test any type of mobile application (native, web, and hybrid). As a cross-platform tool, you can run the same tests on different platforms. To achieve cross-platform functionality, Appium uses vloc-provided Android UI frameworks for testing: XCTest in iOS, UIAutomator or Instrumentation in Android. It encapsulates these vendor frameworks into Selenium WebDriver, which enables developers using Appium to write tests in a variety of languages: Java, Objective-C, JavaScript, PHP, Ruby, Python, and more. This also makes writing Appium tests very similar to writing Selenium tests.
WebDriver was originally created for Web testing, and Appium extends WebDriver with additional API methods to make it more suitable for mobile automation.
Here are some useful Appium features:
- You don’t need to install anything on the device.
- There is no need to recompile or change the application to match Appium.
- Appium has a very large and active community.
- Appium comes with a tool that scans and analyzes the UI components of your application, the Appium UI Inspector. Developers can also use Android Studio’s UI Automator Viewer.
- If you need to write tests for iOS and Android, and you are a fan of Selenium, Appium is a good choice.
Calabash
Calabash is an open source mobile testing tool developed and maintained by Xamarin that supports native and hybrid apps on iOS and Android. Calabash tests support features such as Gesture, assertions, and Screenshots, and are often integrated with driver development test tool Cucumber.
Xamarin announced in 2017 that it would cease further development on Calabash. Given this decision, you can consider Calabash as a less-than-ideal alternative testing solution.
Espresso
Espresso is an Android UI framework from Google. It is a lightweight, white-box tool for application developers, which means that to take full advantage of it, test developers must be familiar with and able to use application code. Espresso testing is solid and fast, and because Espresso has access to the interior of UI objects, it can be used to test the development of WebViews, hybrid applications.
The downside of Espresso is that it can only test one application at a time and has no access to device resources. However, this problem can be easily solved with a federated test created using UI Automator, and this article provides a good explanation of how to implement it.
Sauce Labs supports real device testing of Espresso.
UI Automator
UI Automator is a mobile testing Android UI framework developed and maintained by Google. Its main features include cross-application functional testing, that is, the ability to test multiple applications and switch between installed and system applications.
UI Automator is a black-box testing tool, meaning that test developers don’t need to know the internal application structure and can rely entirely on visible UI elements. The UI Automator test was written in Java and consists of two sets of APIs: the UI Automator APIs, which are UI components that control applications; The second is the Device State APIs for accessing and performing actions on the device (such as changing the rotation of the device, pressing the D-pad button, pressing the Back, Home or menu button, etc.). It also comes with a very useful UI Automator Viewer, a graphical user interface tool that can scan and analyze THE UI components currently configured on the device.
The downside of UI Automator is that it doesn’t support webViews built on top of hybrid Android applications, so UI Automator only supports native Android applications.
Robotium
Robotium is an open source Android UI framework that was born in 2010 and is now a very mature and stable tool. Its most recent release, 5.6.3, was released in September 2016. In the latest versions, test readability and test execution speed have improved significantly.
Most of the technical blogs, tutorials, and courses that cover Robotium are of the black-box type. But really, it’s a grey-box test, because writing Robotium tests requires understanding the internal application structure.
Here are some of the main features of Robotium:
- Native and hybrid applications are supported.
- You can run tests on real devices and emulators.
- Supports the full range of Android UI tools: activities, buttons, menus, toasts, dialog boxes, and more.
- Gestures are supported.
- There are some device controls: changing device orientation, taking screenshots, unlocking the screen, etc.
- Robotium Recorder (https://robotium.com/) is a paid plugin for Android Studio and Eclipse. This is a great tool for getting tests up and running quickly.
- Can run as part of continuous integration.
- The language of choice for Robotium is Java.
Robotium, backed by Sauce Labs, can be used to test real-world devices.
conclusion
Choosing the right Android UI framework for your project can be challenging, and in some cases, you may need to use multiple tools to achieve the right balance, which is why test grids like Sauce Labs that support multiple test frameworks are so popular.
This article is translated from Dzone.com
Huidu control | to provide software technology overall solution
Gathered in the world more than three thousand excellent controls, software products, to provide industry-leading consulting, training and development services enterprises QQ: 800018081 | tel: 023-66090381