在windows下运行CTS

1 解压CTS;

2 修改cts/android-cts/tools/startcts:

       SDK_ROOT=android-sdk-windows/tools

 

3 在终端运行如下命令进入CTS shell:

       java -Xmx512M -cp C:/android-cts/tools/cts.jar;C:/android-cts/tools/hosttestlib.jar;C:/android-cts/tools/junit.jar;D
:/android-sdk-windows/tools/lib/ddmlib.jar com.android.cts.TestHost C:/android-cts/repository/host_config.xml

 

 

运行单个用例如下:

cts_host > start --plan Android -t android.app.cts.DialogTest#testOnKeyDownKeyUp
start test android.app.cts.DialogTest#testOnKeyDownKeyUp
==============================================================
Test package: android.app
android.app.cts.DialogTest#testOnKeyDownKeyUp....(pass)
==============================================================
Time: 4421.515s

 

 

运行一个测试包:

cts_host > start --plan Android -p android.app.cts.InstrumentationTest
start java package android.app.cts.InstrumentationTest
==============================================================
Test java package contained in test package android.app: android.app.cts.InstrumentationTest
android.app.cts.InstrumentationTest#testAllocCounting...(pass)
android.app.cts.InstrumentationTest#testCallActivityOnCreate...(pass)
android.app.cts.InstrumentationTest#testCallActivityOnDestroy...(pass)
android.app.cts.InstrumentationTest#testCallActivityOnNewIntent...(pass)
android.app.cts.InstrumentationTest#testCallActivityOnPause...(pass)
android.app.cts.InstrumentationTest#testCallActivityOnPostCreate...(pass)
android.app.cts.InstrumentationTest#testCallActivityOnRestart...(pass)
android.app.cts.InstrumentationTest#testCallActivityOnRestoreInstanceState...(pass)
android.app.cts.InstrumentationTest#testCallActivityOnResume...(pass)

 

 

或者

cts_host > start --plan CTS

你可能感兴趣的:(Android)