How to run CTS tests in android(Eclair)?

前端 未结 4 1844
伪装坚强ぢ
伪装坚强ぢ 2020-12-21 12:34

In order to release a device to the market, You need to run the Compatibility Test Suite given by android...I need to know how to download and run it..

4条回答
  •  隐瞒了意图╮
    2020-12-21 12:50

    Thanks for all the guides and links above that helps me to setup the CTS successfully.

    I using - Android CTS v2.3_r8

    I summarize the steps here for those who wish to get CTS up on Windows.

    1. Install cygwin here: http://www.cygwin.com

    2. I placed android-cts in my cygwin folder e.g. C:\cygwin\home\Username\. You may set up accordingly if you have placed it elsewhere.

    3. Create new Environment Variables to point to SDK_ROOT and CTS_ROOT directories

      1. Go to Control panel->System -> Advanced tab
      2. Click on Environment variables
      3. Click on New to add CTS_ROOTS to system variables and add the path of android-cts to its value
      4. Do the same for SDK_ROOT and add the path of andriod-sdk to its value
    4. Go to android-cts\tools and modify 2 lines in the startcts script file as follows [With help from How to run Android's CTS on windows on an emulator but some slight modification that works for me

      JARS="$(cygpath -w -p ${CTS_LIB}:${DDM_LIB}:${JUNIT_LIB}:${HOSTTEST_LIB})"
      java ${JAVA_OPTS} -cp ${JARS} com.android.cts.TestHost "$(cygpath -w "${CONFIG}")" "$@" ${DDCONFIG}
      

    Save startcts as Unix file. I use dos2unix.exe downloaded from http://waterlan.home.xs4all.nl/dos2unix.html to convert it to Unix file.

    Then, to run CTS

    1. Attach android device to PC

    2. (a) Go to cmd prompt, type adb install -r android-cts/repository/testcases/CtsDeviceAdmin.apk

    3. (b) On the device, enable all the android.deviceadmin.cts.* device administrators under Settings > Location & security > Select device administrators

    4. Run cygwin and go to android-cts/tools

    5. Execute Android CTS by ./startcts

    For how to run the tests in CTS, I refer again to section Working with CTS in the link given the earlier comment by cezio "using-androids-compatibility-test-suite"

提交回复
热议问题