Android's commonly used automated testing tool framework:
Monkey,monkeyrunner,uiautomator,robotium,appium,monkey Talk
But what do these tool frameworks have to do with a picture? (The picture is borrowed from a blog.)
is not a face, do not know what the ghost. Learn more below.
First, Monkey
Is the Android SDK comes with a test tool, is a command-line tool, can be run in the emulator or the actual device, it sends the system pseudo-random user event stream (such as key input, touch screen input, gesture input, etc.), to implement the development of the application for stress testing. Because test events and data are random and cannot be customized, there are significant limitations.
Second, Monkeyrunner
is a test tool provided by the Android SDK. Strictly speaking, Monkeyrunner is actually an API toolkit that is more powerful than monkey, and can write test scripts to customize data and events. The disadvantage is that the script (Jython (Java)) is written in Python (Python (c)), is demanding for testers, has a higher learning cost, and is manipulated using the by Id/name/text method (Hierarchyviewer), which is slow to execute. Typical applications: Install, uninstall, start activity, click X, y coordinates, send key events, drag, screenshots, etc.
Third, Uiautomator
Is the automated testing framework provided by Android, which basically supports all Android event operations. is used to do the UI test, that is, the normal manual test, click on each control element to see if the output results are expected. Contrast instrumentation it does not require testers to understand the code implementation details (you can use Uiautomatorviewer to grab control properties on the app page without looking at the source). You can cross apps (for example: Many apps have a choice of albums, open a camera to take pictures, this is cross-app testing). The disadvantage is that only the SDK (Android 4.1) and above are supported, and the Hybird App and WebApp are not supported.
Iv. Robotium
is based on the instrumentation test framework, mainly for Android platform applications for black box Automation testing, it provides simulation of various gesture operations (click, Long Press, swipe, etc.), find and assert the mechanism of the API, to be able to manipulate the various controls. Robotium combines Android's official testing framework to automate testing of applications. In addition, the Robotium 4.0 version already supports the operation of the WebView. Robotium is supportive of Activity,dialog,toast,menu. Support native app, Hybird app. Disadvantages cannot span apps.
Recording tool Radar (unstable), Testin (no source code), official website tools (charge)
Development environment: scripting language introduced in Java;eclipse: Robotium-solo-**.jar
Wu, Appium (official website: http://appium.io/)
is an open source mobile automation testing framework, support native app, Hybird app, Web app, support Android, IOS, Firefox OS, cross-platform can be on Mac,windows and Linux system. Appium automated testing does not require recompiling the app; scripting languages: Java, Python, Ruby, C #, Objective C, PHP and other mainstream languages.
Restrictions: If you use Appium in Windows, you can't use precompiled. App files dedicated to OS X because Appium relies on OS X dedicated libraries to support iOS testing, so you can't test iOS Apps on the Windows platform. This means that you can only run iOS tests on your Mac.
Summary: in the iOS section is encapsulated uiautomation;android 4.2 above is used Uiautomator,android 2.3 ~ 4.1 is instrumentation, It also says that the Appium encapsulates both Uiautomator and instrumentation. So Appium has all the benefits of the above frameworks: cross-app, support for native apps, Hybird apps, Web apps, and N languages to write your test scripts.
The Appium kernel recognizes elements based on uiautomator. If only the Android app product, the recommended choice Robotium, provides the API is better than Appium, both iOS and Android, use Appium
Liu, instrumentation
It was the Android automated test tool class that Google provided early on, and while JUnit could have tested Android at the time, instrumentation allows you to do more complex testing of your application, even at the framework level. With instrumentation you can simulate events such as press, lift, screen click, scrolling, etc. Instrumentation is implemented by running the main program and the test program in the same process, you can think of instrumentation as an activity-or service-like component that monitors your main program while the program is running. The disadvantage is that for testers the ability to write code requires a high level of knowledge about Android, and the need to configure Androidmanifest.xml files to span multiple apps.
Seven,Espresso
Is Google's Open source Automation testing framework. Compared to Robotium and uiautomator, it is characterized by a smaller size, more concise, more accurate API, easy to write test code, easy and quick to get started. Because it is based on instrumentation, it cannot cross the app.
Eight,selendroid
is based on the instrumentation test framework, you can test the native app, Hybird app, Web app, but less online data, community activity is not small.
The contents of this article refer to the network resources, thank the original author, if there is a copyright issue, please leave a message.
Android Automated Test framework