Compatibility Test Suite Cts User Manual

The Compatibility Test Suite Verifier (CTS Verifier) is a supplement to the CTS available for download. CTS Verifier provides tests for APIs and functions that cannot be tested on a stationary device without manual input (e.g. Audio quality, accelerometer, etc).

The Android Compatibility Test Suite Verifier (CTS Verifier) supplements theCompatibility Test Suite (CTS). While CTS checks APIs and functions that can beautomated, CTS Verifier provides tests for APIs and functions that can't betested on a stationary device without manual input, such as audio quality,touchscreen, accelerometer, and camera.

Requirements

Before running CTS Verifier, ensure that you have the following equipment:

  • Android device that has verified Android API compatibility by successfullypassing the CTS. This is the device under test (DUT).
  • Linux computer with USB 2.0 compatible port. All connections to the DUT gothrough this port.
  • Second Android device with a known compatible Bluetooth, Wi-Fi direct, andNFC host card emulation (HCE) implementation.
  • A Wi-Fi router configured with access point name and password. The routershould have the ability to disconnect from the internet, but not powered off.

Setting up

To setup the CTS Verifier testing environment:

  1. On the Linux computer:
    • Install the AndroidStudio.
    • Download theCTS Verifier APK for theversion of Android to test.
  2. Connect the DUT to the Linux computer.
  3. From a terminal on the Linux computer, install CtsVerifier.apkon the DUT.
  4. For Android 10 and higher, run the following command to givepermission to the app to create the report.
  5. Ensure that the DUT has the system data and time set correctly.
TestNote: SeeCTS Verifier for Instant Appsfor more information.

Running

Launch the CTS Verifier application by tapping the CTS Verifier icon on the DUT.

Figure 1. CTS Verifier icon

The app displays several test sets available for manual verification.

Figure 2. CTS Verifier menu of tests

Each test contains a set of common elements (Info, Pass, Fail) at the bottom of the screen.

Figure 3. Test elements
Compatibility test suite cts user manual pdf
  • Info (?). Tap to display test instructions. Also appearsautomatically the first time a test is opened.
  • Pass (✓). Tap if the DUT meets the test requirements perthe Info instructions.
  • Fail (!). Tap if the DUT doesn't meet the testrequirements per the Info instructions.

Compatibility Test Suite Cts User Manual 2016

Note: In some tests, pass/fail isdetermined automatically.

Some tests, such as the USB accessory mode and camera calibration test,require additional test setup and instructions as detailed in the followingsections.

Testing USB accessory mode for 8.0 and above

Figure 4. USB accessory test prcedure for 8.0 and above
Figure 5. Testing USB accessory mode for 8.0 and above

Testing USB accessory mode for 7.x and below

Compatibility Test Suite Cts User Manual Online

The USB Accessory test requires a Linux computer to run the USB desktopmachine (host) program.

Compatibility Test Suite Cts User Manual Guide

  1. Connect the DUT to the Linux computer.
  2. On the computer, execute the cts-usb-accessory program from theCTS Verifier package:
  3. Wait for a popup message to appear on the DUT, then selectOK.
    Figure 6. USB accessory test
  4. Go to the USB Accessory Test in the CTS Verifier application on DUT.
  5. On the computer, review the output from the console. Example output:

Calibrating camera field of view

Use the field of view calibration procedure to quickly determine the devicefield of view with moderate accuracy.

  1. Set up the test environment:
    1. Print thecalibration-pattern.pdftarget file on 11” x 17” or A3 size paper.
    2. Mount the printed pattern on a rigid backing.
    3. Orient the camera device and the printed target as shown below.
      Figure 7. Camera printed target
  2. Set the target width:
    1. Measure the distance (in centimeters) between the solid lines on the targetpattern to account for printing inaccuracies (~38 cm).
    2. Start the calibration application.
    3. Press the setup button and select Marker distance.
    4. Measure and enter the distance to the target pattern (~100 cm).
    5. Press the back button to return to the calibration preview.
  3. Verify that the device and target are placed as shown in the figure and thecorrect distances have been entered into the setup dialog. The preview displays the image with avertical line overlaid onto it; this line should alignwith the center line of the target pattern. The transparent grid can be usedwith the other vertical lines to ensure that the optical axis is orthogonal tothe target.
  4. Run the calibration test:
    1. Select an image resolution (using selector at the bottom left), then tap thescreen to take a photo. The test enters calibration mode and displays the photowith two vertical lines overlaid onto the image.
    2. Determine accuracy:
      • If the lines align with the vertical lines on the target pattern within afew centimeters, the reported field of view for the selected resoultion is accurate.
      • If the lines don't align, the reported field of view is inaccurate. Tocorrect this, adjust the slider at the bottom of the screen until the overlay alignswith the target pattern as closely as possible. When the overlay and the targetpattern image are aligned, the displayed field of view is a closeapproximation to the correct value. The reported field of view should bewithin +/-1 degree of the calibration value.
    3. Press back button and repeat the calibration test for all image resolutionssupported by the DUT.

Exporting results

Compatibility Test Suite Cts User Manual Download

After all tests complete, you can save the results as a report and download themto a computer. Report names are automatically time-stamped based on the DUTsystem time.

Compatibility Test Suite (cts) User Manual

  1. Tap the Save (disk) icon.
    Figure 8. CTS Verifier Save icon
    Note: Android 7.0 and higher don't includethe preview feature.
  2. Wait for the popup message to display the path to the saved report (for example,/sdcard/verifierReports/ctsVerifierReport-date-time.zip), thenrecord the path.
    Figure 9. CTS Verifier path to savedreport
  3. Connect the DUT to the Linux computer.
  4. From the Android SDK installation on the Linux computer, download reportsfrom the connected device using adb shell content read or adb pullCTSVerifierReportPath.
    • For Android 7.x and higher, download all reports using:
    • For Android 6.0 and lower, download all reports using:
    • For Android 10 and higher, implementing Automotive and devices runningin secondary user, download thelatest report using:

      Note: Use adb shell am get-current-user toget the CURRENT_USER ID.

      To list all reports available in the connected device:

      To download a report from the list, you can specify the Row ID or filename. For example:

  5. To clear pass/fail results, select the results in the CTS Verifier app andselect Menu > Clear.