Clay Murphy | 468ba57 | 2015-04-13 18:25:11 -0700 | [diff] [blame] | 1 | page.title=Using CTS Verifier |
| 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 | <p>The Android Compatibility Test Suite Verifier (CTS Verifier) is a supplement to |
| 28 | the Compatibility Test Suite (CTS). While CTS checks those APIs and functions |
| 29 | that can be automated, CTS Verifier provides tests for those APIs and functions |
| 30 | that cannot be tested on a stationary device without manual input, like audio |
| 31 | quality, touchscreen, accelerometer, camera, etc.</p> |
| 32 | <h2 id=test_preparation>Test preparation</h2> |
| 33 | <p>The device must have verified Android API compatibility by successfully passing |
| 34 | the Compatibility Test Suite.</p> |
| 35 | <h3 id=hardware_requirements>Hardware requirements</h3> |
| 36 | <ul> |
| 37 | <li> A Linux computer with USB 2.0 compatible port |
| 38 | <li> A second Android device with a known compatible Bluetooth, Wi-Fi direct, and |
| 39 | NFC Host Card Emulation (HCE) implementation |
| 40 | </ul> |
| 41 | <h3 id=setup>Setup</h3> |
| 42 | <ul> |
| 43 | <li>Install the <a href="http://developer.android.com/sdk/index.html">Android |
| 44 | SDK</a> on the Linux computer <li>Download the appropriate <a |
| 45 | href="{@docRoot}compatibility/downloads.html">CTS Verifier.apk</a> for the |
| 46 | version of Android under test. |
| 47 | <li>Install CTS Verifier.apk to the <em>Device Under Test</em> (DUT). <br> |
| 48 | <code>adb install -r CtsVerifier.apk</code> |
| 49 | <li>Ensure that the device has its system data and time set correctly. |
| 50 | </ul> |
| 51 | <h2 id=cts_test_procedure>CTS Verifier test procedure</h2> |
| 52 | <ol> |
| 53 | <li>After the CTS Verifier.apk has been installed, launch the CTS Verifier |
| 54 | application: |
| 55 | |
| 56 | <img src="images/cts-verifier-icon.png" alt="CTS Verifier icon in launcher" id="figure1" /> |
| 57 | <p class="img-caption"> |
| 58 | <strong>Figure 1.</strong> CTS Verifier icon |
| 59 | </p> |
| 60 | |
| 61 | <li>Once opened, the CTS Verifier displays a list of all test sets available for |
| 62 | manual verification: |
| 63 | |
| 64 | <img src="images/cts-verifier-menu.png" alt="CTS Verifier menu of tests" id="figure2" /> |
| 65 | <p class="img-caption"> |
| 66 | <strong>Figure 2.</strong> CTS Verifier menu of tests |
| 67 | </p> |
| 68 | |
| 69 | <li>Each test contains a set of common elements (in some tests, Pass/Fail is |
| 70 | determined automatically): |
| 71 | <ul> |
| 72 | <li><em>Info</em>—a set of instructions to run the test. This will appear as a popup the first |
| 73 | time each test is opened or whenever the <strong>Info</strong> button (?) is pressed. |
| 74 | <li><em>Pass</em>—If the DUT meets the test requirements per the instructions from Info, press |
| 75 | the <strong>Pass</strong> button (✓). |
| 76 | <li><em>Fail</em>—If the DUT does not meet the test requirements per the instructions from Info, |
| 77 | press the <strong>Fail</strong> button (!). |
| 78 | </ul> |
| 79 | |
| 80 | <img src="images/video-verifier.png" alt="Streaming video quality verifier" id="figure3" /> |
| 81 | <p class="img-caption"> |
| 82 | <strong>Figure 3.</strong> Video quality verifier |
| 83 | </p> |
| 84 | |
| 85 | </ol> |
| 86 | |
| 87 | <h2 id=specific_test_requirements>Specific test requirements</h2> |
| 88 | <h3 id=usb_accessory>USB Accessory</h3> |
| 89 | <p>In order to run the USB Accessory test, you need a Linux computer to run the |
| 90 | USB desktop machine (host) program.</p> |
| 91 | <ol> |
| 92 | <li>Connect the DUT to a computer. |
| 93 | <li>Execute the cts-usb-accessory program on the computer found in the CTS Verifier |
| 94 | package. |
| 95 | <li>A popup message will appear on the DUT. Select <strong>OK</strong> and go into the USB Accessory Test in the CTS Verifier application. |
| 96 | <br> |
| 97 | <img src="images/screen-lock-test.png" alt="CTS Verifier screen lock test" id="figure4" /> |
| 98 | <p class="img-caption"> |
| 99 | <strong>Figure 4.</strong> Screen lock test |
| 100 | </p> |
| 101 | |
| 102 | <li>Output similar to below will appear on the computer’s console. |
| 103 | </ol> |
| 104 | <pre> |
| 105 | out/host/linux-x86/cts-verifier/android-cts-verifier$ <strong>./cts-usb-accessory</strong> |
| 106 | CTS USB Accessory Tester |
| 107 | Found possible Android device (413c:2106) - attempting to switch to accessory |
| 108 | mode... |
| 109 | Failed to read protocol version |
| 110 | Found Android device in accessory mode (18d1:2d01)... |
| 111 | [RECV] Message from Android device #0 |
| 112 | [SENT] Message from Android accessory #0 |
| 113 | [RECV] Message from Android device #1 |
| 114 | [SENT] Message from Android accessory #1 |
| 115 | [RECV] Message from Android device #2 |
| 116 | [SENT] Message from Android accessory #2 |
| 117 | [RECV] Message from Android device #3 |
| 118 | [SENT] Message from Android accessory #3 |
| 119 | [RECV] Message from Android device #4 |
| 120 | [SENT] Message from Android accessory #4 |
| 121 | [RECV] Message from Android device #5 |
| 122 | [SENT] Message from Android accessory #5 |
| 123 | [RECV] Message from Android device #6 |
| 124 | [SENT] Message from Android accessory #6 |
| 125 | [RECV] Message from Android device #7 |
| 126 | [SENT] Message from Android accessory #7 |
| 127 | [RECV] Message from Android device #8 |
| 128 | [SENT] Message from Android accessory #8 |
| 129 | [RECV] Message from Android device #9 |
| 130 | [SENT] Message from Android accessory #9 |
| 131 | [RECV] Message from Android device #10 |
| 132 | [SENT] Message from Android accessory #10 |
| 133 | </pre> |
| 134 | <h3 id=camera_field_of_view_calibration>Camera field of view calibration</h3> |
| 135 | <p>This field of view calibration procedure is designed to be a quick way to |
| 136 | determine the device field of view with moderate accuracy. |
| 137 | <p><strong>Setup</strong> - Print the <a |
| 138 | href="{@docRoot}compatibility/calibration-pattern.pdf">calibration-pattern.pdf</a> |
| 139 | target file and mount it on a rigid backing. Print on 11” x 17” or A3. Orient |
| 140 | the camera device and the printed target as shown in the diagram below:</p> |
| 141 | |
| 142 | <img src="images/camera-printed-target.png" alt="Camera printed target" id="figure5" /> |
| 143 | <p class="img-caption"> |
| 144 | <strong>Figure 5.</strong> Camera printed target |
| 145 | </p> |
| 146 | |
| 147 | <p><strong>Setting the target width</strong> - Measure the distance between the |
| 148 | solid lines on the target pattern in centimeters to account for printing |
| 149 | inaccuracies (~38 cm).</p> |
| 150 | <ol> |
| 151 | <li>Start the calibration application. |
| 152 | <li>Press the setup button and select “Marker distance” to enter the distance. |
| 153 | <li>Measure and enter the distance to the target pattern (~100 cm). |
| 154 | <li>Press the back button to return to the calibration preview. |
| 155 | </ol> |
| 156 | <p><strong>Calibration process</strong> - Verify that the device and target are |
| 157 | placed as shown in the figure and the correct distances have been entered into |
| 158 | the setup dialog.The preview will display the image with a vertical line |
| 159 | overlaid onto it. This line should align with the center line of the target |
| 160 | pattern. The transparent grid can be used with the other vertical lines to |
| 161 | ensure that the optical axis is orthogonal to the target.</p> |
| 162 | <ol> |
| 163 | <li>Select an image resolution to test from the selector at the bottom left. |
| 164 | <li>Tap the screen to take a photo and enter the calibration mode (described |
| 165 | below). |
| 166 | <li>Hit the back button and repeat for all supported image resolutions. |
| 167 | </ol> |
| 168 | <p><strong>Calibration test (per resolution)</strong> In the calibration mode, the photo will be displayed with two vertical lines |
| 169 | overlaid onto the image.These lines should align with the vertical lines on the target pattern within a |
| 170 | few pixels. If they do not, then the reported field of view for that mode is |
| 171 | inaccurate (assuming the setup is correct).Adjust the slider at the bottom of the screen until the overlay aligns with the |
| 172 | target pattern as closely as possible. The displayed field of view will be a |
| 173 | close approximation to the correct value when the overlay and the target |
| 174 | pattern image are aligned. The reported field of view should be within +/-1 |
| 175 | degree of the calibration value.</p> |
| 176 | <h2 id=exporting_test_reports>Exporting test reports</h2> |
| 177 | <ol> |
| 178 | <li>After all tests are completed, tap the <strong>Save (disk)</strong> icon. |
| 179 | <br> |
| 180 | <img src="images/verifier-save-icon.png" alt="CTS Verifier Save icon" id="figure6" /> |
| 181 | <p class="img-caption"> |
| 182 | <strong>Figure 6.</strong> CTS Verifier Save icon |
| 183 | </p> |
| 184 | |
| 185 | <li>A path to the saved report will be displayed in pop-up (e.g. |
| 186 | <code>/mnt/sdcard/ctsVerifierReports/ctsVerifierReport-date-time.zip</code>). |
| 187 | Record the path. |
| 188 | <br> |
| 189 | <img src="images/path-saved-report.png" alt="CTS Verifier path to saved report " id="figure7" /> |
| 190 | <p class="img-caption"> |
| 191 | <strong>Figure 7.</strong> CTS Verifier path to saved report |
| 192 | </p> |
| 193 | |
| 194 | <li>Connect the device via USB to a computer with the SDK installed. |
| 195 | <li>From the computer’s SDK installation, run <code>adb pull |
| 196 | <CTS Verifier report path> |
| 197 | </code> to download the report from the device. |
| 198 | <ul> |
| 199 | <li>To download all reports run : <code>adb pull /mnt/sdcard/ctsVerifierReports/ .</code> |
| 200 | <li>The name of the reports are time-stamped based on the DUT’s system time. |
| 201 | <li>To clear results after they have been selected, select <strong>Menu > Clear</strong>. This will |
| 202 | clear the Pass/Fail results. |
| 203 | </ol> |