Clay Murphy | 468ba57 | 2015-04-13 18:25:11 -0700 | [diff] [blame^] | 1 | page.title=Compatibility Test Suite |
| 2 | @jd:body |
| 3 | |
| 4 | <!-- |
| 5 | Copyright 2015 The Android Open Source Project |
| 6 | |
| 7 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | you may not use this file except in compliance with the License. |
| 9 | You may obtain a copy of the License at |
| 10 | |
| 11 | http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | |
| 13 | Unless required by applicable law or agreed to in writing, software |
| 14 | distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | See the License for the specific language governing permissions and |
| 17 | limitations under the License. |
| 18 | --> |
| 19 | <div id="qv-wrapper"> |
| 20 | <div id="qv"> |
| 21 | <h2>In this document</h2> |
| 22 | <ol id="auto-toc"> |
| 23 | </ol> |
| 24 | </div> |
| 25 | </div> |
| 26 | |
| 27 | <h2 id="how-does-the-cts-work">How does the CTS work?</h2> |
| 28 | |
| 29 | <p>The CTS is an automated testing harness that includes two major software components:</p> |
| 30 | <ul> |
| 31 | <li> |
| 32 | <p>The CTS tradefed test harness runs on your desktop machine and manages test execution.</p> |
| 33 | </li> |
| 34 | <li> |
| 35 | <p>Individual test cases are executed on the Device Under Test (DUT). The test |
| 36 | cases are written in Java as JUnit tests and packaged as |
| 37 | Android .apk files to run on the actual device target.</p> |
| 38 | </li> |
| 39 | </ul> |
| 40 | |
| 41 | <p>The CTS Verifier is a tool for manual testing and includes the following software components:</p> |
| 42 | <ul> |
| 43 | <li> |
| 44 | <p>The CTS verifier app that is executed on the DUT and collects the results.<p> |
| 45 | </li> |
| 46 | <li> |
| 47 | <p>The executable(s) or script(s) that are executed on the desktop machine to |
| 48 | provide data or additional control for some test cases in the CTS Verifier |
| 49 | app.</p> |
| 50 | </li> |
| 51 | </ul> |
| 52 | |
| 53 | <h2 id="workflow">Workflow</h2> |
| 54 | |
| 55 | <div class="figure" style="width:383px"> |
| 56 | <img src="images/cts-0.png" alt="CTS flow" height="340px" id="figure1" /> |
| 57 | <p class="img-caption"> |
| 58 | <strong>Figure 1.</strong> How to use CTS |
| 59 | </p> |
| 60 | </div> |
| 61 | |
| 62 | <p>This diagram summarizes CTS workflow. Please refer to the subpages of this |
| 63 | section starting with <a href="setup.html">Setup</a> for detailed |
| 64 | instructions.</p> |
| 65 | |
| 66 | <h2 id="types-of-test-cases">Types of test cases</h2> |
| 67 | <p>The CTS includes the following types of test cases:</p> |
| 68 | <ul> |
| 69 | <li> |
| 70 | <p><em>Unit tests</em> test atomic units of code within the Android platform; e.g. a single class, such as java.util.HashMap.</p> |
| 71 | </li> |
| 72 | <li> |
| 73 | <p><em>Functional tests</em> test a combination of APIs together in a higher-level use-case.</p> |
| 74 | </li> |
| 75 | </ul> |
| 76 | <p>Future versions of the CTS will include the following types of test cases:</p> |
| 77 | <ul> |
| 78 | <li> |
| 79 | <p><em>Robustness tests</em> test the durability of the system under stress.</p> |
| 80 | </li> |
| 81 | <li> |
| 82 | <p><em>Performance tests</em> test the performance of the system against defined benchmarks, for example rendering frames per second.</p> |
| 83 | </li> |
| 84 | </ul> |
| 85 | <h2 id="areas-covered">Areas covered</h2> |
| 86 | <p>The unit test cases cover the following areas to ensure compatibility:</p> |
| 87 | <table> |
| 88 | <thead> |
| 89 | <tr> |
| 90 | <th>Area</th> |
| 91 | <th>Description</th> |
| 92 | </tr> |
| 93 | </thead> |
| 94 | <tbody> |
| 95 | <tr> |
| 96 | <td>Signature tests</td> |
| 97 | <td>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.</td> |
| 98 | </tr> |
| 99 | <tr> |
| 100 | <td>Platform API Tests</td> |
| 101 | <td>Test the platform (core libraries and Android Application Framework) APIs as documented in the SDK <a href="https://developer.android.com/reference/classes.html">Class Index</a> to ensure API correctness, including correct class, attribute and method signatures, correct method behavior, and negative tests to ensure expected behavior for incorrect parameter handling.</td> |
| 102 | </tr> |
| 103 | <tr> |
| 104 | <td>Dalvik Tests</td> |
| 105 | <td>The tests focus on testing the Dalvik Executable Format.</td> |
| 106 | </tr> |
| 107 | <tr> |
| 108 | <td>Platform Data Model</td> |
| 109 | <td>The CTS tests the core platform data model as exposed to application developers through content providers, as documented in the SDK <a href="https://developer.android.com/reference/android/provider/package-summary.html">android.provider</a> package: contacts, browser, settings, etc.</td> |
| 110 | </tr> |
| 111 | <tr> |
| 112 | <td>Platform Intents</td> |
| 113 | <td>The CTS tests the core platform intents, as documented in the SDK <a href="https://developer.android.com/guide/appendix/g-app-intents.html">Available Intents</a>.</td> |
| 114 | </tr> |
| 115 | <tr> |
| 116 | <td>Platform Permissions</td> |
| 117 | <td>The CTS tests the core platform permissions, as documented in the SDK <a href="https://developer.android.com/reference/android/Manifest.permission.html">Available Permissions</a>.</td> |
| 118 | </tr> |
| 119 | <tr> |
| 120 | <td>Platform Resources</td> |
| 121 | <td>The CTS tests for correct handling of the core platform resource types, as documented in the SDK <a href="https://developer.android.com/guide/topics/resources/available-resources.html">Available Resource Types</a>. This includes tests for: simple values, drawables, nine-patch, animations, layouts, styles and themes, and loading alternate resources.</td> |
| 122 | </tr> |
| 123 | </tbody> |
| 124 | </table> |