Android Test Tutorials

Source: Internet
Author: User

Android Test Tutorial (1): overviewPosted inJuly 31, 2011byGuidebee

Testing is also an important part of the development process, and the Android development environment integrates a test framework that can be used to test various aspects of Android applications, unit tests, UI tests, and so on.

This tutorial is based on the English version of the Android development tutorial.

Basic concepts include

    • Basics of Android Testing
    • Activity testing focuses on activity testing, and describes some techniques for using instrumentation to control activity beyond the normal activity life cycle, then testing the specific functionality of the activity and testing the UI.
    • Content Provider testing focuses on testing content Provider.
    • Service testing focuses on testing the service.
    • Content that needs to be tested, and so on.

And how to create a test project and some test tools provided by Android development tools in the Eclipse ADT development environment. Before reading this tutorial, you need to have some basic knowledge of Android development, see the Android Development tutorial, and learn some of the basic concepts of junit.

The test examples in Apidemo are parsed.

Android Test Tutorial (2): Test basicsPosted inAugust 10, 2011byGuidebee

Android test Framework (Android testing framework) is an integral part of the Android development environment that can be used to test various aspects of Android, from unit testing to framework testing to UI testing.

Its main functions are:

    • The Android test framework is based on JUnit, so you can use JUnit directly to test some classes that aren't very relevant to the Android platform, or use Android's Juint extension to test Android components, if you're just starting to touch Android testing, You can write some common test cases from androidtestcase before you write more complex test cases.
    • The android Juint extension provides test support for specific Android components such as Activity,service, which provides a number of helper methods to help create the "pile" class or method used by the test.
    • The test package that you create contains a similar structure to the main application package in a test package, and the steps to create a test package are basically similar to the way you create an Android app.
    • The ADT for Eclipse contains the SDK tools for creating test cases and provides command-line tools for integration with other Ides. These tools can read the required information from the application package being tested for creating test project build files, mainfest files and file directory structures, and so on.
    • The SDK also provides a moneyrunner (a Python app) that simulates user keystroke events to test the UI.

A summary of the Android test framework:

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.