Android test Appium, Robotium, monkey and other frameworks or tool comparisons

Source: Internet
Author: User
Tags appium

Android test Appium, Robotium, monkey and other frameworks or tool comparisons

1. Appium Test (functional test, user acceptance test, black box test)-Rating:8

The Appium test is equivalent to a black box test. Just test UI logic correctness. So the Appium test framework provides limited methods. Gets a Appiumdriver object. The object just has a lot of findelements() methods to get to the UI element. UI element is webelement, this class provides the method basically is obtains the information primarily, for example obtains name,class,tagname,location,text,isslected,istouched and so on information. There is also a click event generating function click (). Unfortunately, there is no Longclick () event. The entire test framework can be manipulated only by these 2 more useful objects. So on the whole, this test framework is just testing the correctness of the UI logic and not going into the test business logic flow. There is no way to detect it.

Pros:

    • Open Source
    • You can write test code in different languages
    • can test different platform program: Android/ios/web/hybrid
    • The community is more active 2. Robotium Test (functional test, user acceptance test, black box + White box test)-Rating:8

      website:https://code.google.com/p/robotium/

      Pros:

      • Quite Popular for Android testing
      • You can test the source code, or you can test the APK
      • Can test Android native and Android Hybrid App
      • Can test network links and sounds, etc.
      • Open Source
      • The community is more active, the information is easier to find 3. Androidtest (unit test, logic test, white box test)

        This is described in detail in the Https://developer.android.com/tools/testing/index.html SDK. Can be tested for various Android components, including Activitytest,servicetest,contentprovidertest. The ability to obtain resources for each component and inject code for testing.

        1) activity testing mainly test activity, the main test direction is the following three directions:

        • Control over the life cycle of the activity.
        • Dependency Injection:instrumentation allows-to-create mock system objects such as contexts or applications and use th EM to run the activity under test. This helps control of the test environment and isolate it from production systems. You can also the set up customized Intents and start a activity with them. (translation is not very good, probably said to rely on injection to produce simulation objects and then simulate the system environment.) )
        • Controls the control element of the UI and then produces a touch event. This function is similar to that described by Appium.

          2) Service testing test is the service life cycle is normal

          3) Content Povider testiing because provider is a data entry, so the test is whether the data can be read correctly, can write normally. Test that the URI provided by this provider is fully functional. Test whether some illegal URIs can be intercepted, etc. In general, Android comes with unit tests. Suitable for white box testing. Android comes with test words to get the UI interface or something more information, to provide more testing methods.

          4. Monkey (pressure test)

          This is a system tool provided by Android. It sends pseudo-random user event streams (such as key input, touch input, gesture input, etc.) to the system, enabling stress testing of the application under development. Monkey testing is a fast and effective method to test the stability and robustness of the software.

          • The test object is only an application package and has some limitations.
          • The event stream traffic used by the Monky test is random and cannot be customized.
          • The Monkeytest object, number of events, type, frequency, etc. can be set.

            The SDK has a detailed description of http://developer.android.com/tools/help/monkey.html. There is a detailed parameter description of the test in the SDK. This is just a test tool that doesn't involve coding

            5. Monkeyruner (functional test, user acceptance test, black box test)-Rating:5

            Sdk:http://developer.android.com/tools/help/monkeyrunner_concepts.html This is a test implemented in Python code. There are mainly 3 classes of Monkeydevice, Monkeyimage, Monkeyruner. The main thing is to run the program, in the program to provide keystrokes or touch event input values and then screenshot, through the screenshot of the normal operation of the screen. Event Api:press (string name, dictionary type) touch (integer x, integer y, Integer type) drag (tuple start, tuple end, float Duration, integer steps) startactivity (string URI, string action, string data, String mimetype, iterable categories Dict Ionary Extras, component component, flags), please refer to the API for details.

            6. Uiautomator-Official (black box test, functional test)-Rating:7

            Sdk:http://developer.android.com/tools/testing/testing_ui.html

            Pro:

              • You can test situations where you need to switch between different apps.
              • Official support

                Cons:

                • Only Test Android native app
                • Requires Android SDK 4.1+
                • Unable to get activity for current load
                • Unable to do network link test and sound test
                • Debug process is more troublesome

                  The main function is similar to Appium, the main class uidevice,uiobjec,uiselector,uicollection. Uidevice more Appium appiumdriver analogy. The rest of the more webelement analogy is just divided in more detail. Functionally, it is also more appium similar. Find the UI control and then manipulate it with information such as Text,classname.

                  7. Monkeytalk (white box test, functional test)

Android test Appium, Robotium, monkey and other frameworks or tool comparisons

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.