page.title=Compatibility Test Suite doc.type=compatibility @jd:body

How does the CTS work?

The CTS is an automated testing harness that includes two major software components:

Workflow

  1. Obtain the CTS source code. The CTS is included in the Android source code available from the Android Open Source Project. (To get a copy of that source code, read this page.
  2. Attach at least one device (or emulator) to your machine.
  3. Launch the CTS. The CTS test harness loads the test plan onto the attached devices. For each test in the test harness:
  4. Once all the tests are executed, you can view the test results in your browser and use the results to adjust your design. You can continue to run the CTS throughout your development process.
When you are ready, you can submit the report generated by the CTS to cts@android.com. The report is a .zip archived file that contains XML results and supplemental information such as screen captures.

Types of test cases

The CTS includes the following types of test cases:
Future versions of the CTS will include the following types of test cases:

Areas Covered

The unit test cases cover the following areas to ensure compatibility
AreaDescription
Signature tests For each Android release, there are XML files describing the signatures of all public APIs contained in the release. The CTS contains a utility to check those API signatures against the APIs available on the device. The results from signature checking are recorded in the test result XML file.
Platform API Tests Test the platform (core libraries and Android Application Framework) APIs as documented in the SDK Class Index to ensure API correctness:
  • correct class, attribute and method signatures
  • correct method behavior
  • negative tests to ensure expected behavior for incorrect parameter handling
Dalvik VM TestsThe tests focus on testing the Dalvik VM
Platform Data Model The CTS tests the core platform data model as exposed to application developers through content providers, as documented in the SDK android.provider package:
  • contacts
  • browser
  • settings
  • more...
Platform Intents The CTS tests the core platform intents, as documented in the SDK Available Intents.
Platform Permissions The CTS tests the core platform permissions, as documented in the SDK Available Permissions.
Platform Resources
The CTS tests for correct handling of the core platform resource types, as documented in the SDK Available Resource Types . This includes tests for:
  • simple values
  • drawables
  • nine-patch
  • animations
  • layouts
  • styles and themes
  • loading alternate resources