Android Test Basics (i)

Source: Internet
Author: User
Tags new set

Testing Fundamentals

The Android testing framework, an integral part of the development environment, provides an architecture and powerful tool S-that-help-test every aspect of your application at the every level from the unit to framework.

Android test framework is an important part of the development environment, providing a framework and powerful tool area to help you test all aspects of your application, from unit testing to frameworks, to different levels of testing.

the Testing Framework has these key features:

The test framework has the following key features:

    • android test suites is based on JUnit. You can use plain junit-test a class that doesn ' t-call the Android API, or Android's JUnit extensions to test Android C Omponents. If you ' re new to Android testing, you can start with general-purpose test case classes such As  androidtestcase   and then go-to-use more sophisticated Classes.

  The Android test suite is based on JUnit. You can use the normal JUnit zone to test classes that do not call the Android API. or the JUnit extension of Android to test Android components, if you are a novice in Android testing, you can use more complex classes from generic test case classes, for example AndroidTestCase , later.

    • The Android JUnit extensions provide component-specific test case classes. These classes provide helper methods for creating mock objects and methods this help you control the lifecycle of a compon Ent.

The Android JUnit extension provides a test case class for a specific component. These classes help you to control the life cycle of these components by helping to create mock objects and methods.

    • Test suites is contained in test packages that is similar to main application packages, so you don ' t need to learn a new Set of tools or techniques for designing and building tests.

Test suites are included in the test take care, very similar to the main application package, so you do not need to learn new tools or techniques to design and construct tests.

    • The SDK tools for building and tests is available in Eclipse with ADT, and also in command-line form for use with other I Des. These tools get information from the project of the application under test and use this information to automatically creat E The build files, manifest file, and directory structure for the test package.

The SDK's construction and testing tools are available in ADT for Eclipse, and are available in command-line mode in other Ides. These tools get information from project in the application under test and are automatically created with this information, build Files,manidest The directory structure of file and test packages.

    • the SDK also Provides  Monkeyrunner, an API for testing devices with Python programs, And  ui/ Application Exerciser Monkey, a command-line tool for stress-testing UIs by sending pseudo-random events to a device.

The SDK also provides Monkeyrunner, an API test tool written in the Python language, and Ui/application exerciser Monkey, a command-line tool for stress testing by sending pseudo-random events.

this document describes the fundamentals of the Android testing framework, including the structure of tests, the APIs tha t use to develop tests, and the tools, I use to run tests and view results. The document assumes you has a basic knowledge of Android application programming and JUNIT testing methodology.

This document describes the basics of the Android test framework, including the test structure, the API to enhance the test, the tools you do to test and see the results. This document assumes that you have the basics of Android programming and the JUnit test methodology.

The following diagram summarizes the testing framework:

Summarizes the 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.