Code Monkey home page Code Monkey logo

ctsverifiersample's Introduction

CTS Verifier Sample App

CTS Verifier provides tests for APIs and functions that can't be tested on a stationary device without manual input. Currently, you can only build CTS Verifier APK from full Android source. Which takes hours to sync and build. This sample app demonstrates how to un-bundle CTS verifier to build by Android Studio. It also shows how an independent test app may report test results as a CTS verifier report.

Feature

  • CTS verifier sensor test.
  • Generate CTS verifier test report.

Architecture

Notes

Create prebuilt libs from Android

  1. Building and running CTS
  2. Build the nessesary libaries for Android Studio CTS verifier sample app development
    • make -j8 cts-sensors-tests compatibility-device-util-axt android.test.base_static
    • cp out/target/product/generic_x86_64/obj/JAVA_LIBRARIES/cts-sensors-tests_intermediates/javalib.jar ~/Downloads/cts-sensors-tests.jar
    • cp out/target/product/generic_x86_64/obj/JAVA_LIBRARIES/compatibility-device-util-axt_intermediates/javalib.jar ~/Downloads/compatibility-device-util-axt.jar
    • cp out/target/product/generic_x86_64/obj/JAVA_LIBRARIES/android.test.base_static_intermediates/javalib.jar ~/Downloads/android.test.base.jar
  3. Remove mockito-extensions in cts-sensors-tests.jar.
    • If not removed, it will cause error: "More than one file was found with OS independent path 'mockito-extensions/org.mockito.plugins.MockMaker'." ToDo:

Manual CTS Verifier

  • Some tests will require multiple tires to pass
  • Average test time is around 4 min

Refactor

Unable to save report on user build

Fix: android:requestLegacyExternalStorage=" true"

  • For Android 10 or API > 29 this will have to be present, ignore otherwise

Unbundleing

These are the depenencies to be worked around and clean up for fully unbundle.

  • SensorFeaturesDeactivator.java:142: error: cannot find symbol Settings.Secure.DOZE_ENABLED
  • cts-sensors-test depends on android.test.AndroidTestCase, which is built in android.test.base_static
  • cts-sensors-test and compatibility-device-util-axt both contain org.mockito.plugins.MockMaker, causing error: More than one file was found with OS independent path 'mockito-extensions/org.mockito.plugins.MockMaker'.
    • Open the jar and delete mockito-extensions folder in either one.
  • To unbundle pre-built libary

ToDo

  • Add to send report.
  • Add UML milestone test time
  • Optimise

ctsverifiersample's People

Contributors

alwin-lin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.