CTS/GTS相关命令

最近由于项目上cts/gts问题太多,于是在帮同事分担部分问题fail项的解决、android5.1和android5.0

下面是简单总结了下相关的一些命令,当然还有很多,这个就需要平时多多留意并学习积累了。


    
    
    
    
CTS-tradefed host version 5.1_r2 CTS-tradefed is the test harness for running the Android Compatibility Suite, built on top of the tradefed framework. Available commands and options Host: help: show this message help all: show the complete tradefed help exit: gracefully exit the cts console, waiting till all invocations are complete Run: run cts --plan test_plan_name: run a test plan run cts --package/-p : run a CTS test package run cts --class/-c [--method/-m] : run a specific test class and/ormethod run cts --continue-session session_ID: run all not executed tests from a previous CTS session run cts [options] --serial/-s device_ID: run CTS on specified device run cts [options] --shards number_of_shards: shard a CTS run into given number of independent chunks, to run on multiple devices inparallel run cts --help/--help-all: get more help on running CTS List: l/list d/devices: list connected devices and their state l/list packages: list CTS test packages l/list p/plans: list CTS test plans l/list i/invocations: list invocations aka CTS test runs currentlyin progress l/list c/commands: list commands: aka CTS test run commands currently in the queue waiting to be allocated devices l/list r/results: list CTS results currently present in the repository Add: add derivedplan --plan plane_name --session/-s session_id -r [pass/fail/notExecuted/timeout]: derive a plan from the given session Dump: d/dump l/logs: dump the tradefed logs for all running invocations Options: --disable-reboot : Do not reboot device after running some amount of tests.

    
    
    
    
XTS-tradefed host version 2.1_r2 Available commands and options Host: help: show this message help all: show the complete tradefed help exit: gracefully exit the xts console, waiting till all invocations are complete Run: run xts --plan test_plan_name: run a test plan run xts --package/-p : run a XTS test package run xts --class/-c [--method/-m] : run a specific test class and/ormethod run xts --continue-session session_ID: run all not executed tests from a previous XTS session run xts [options] --serial/s device_ID: run XTS on specified device run xts [options] --shards number_of_shards: shard a XTS run into given number of independent chunks, to run on multiple devices inparallel run xts --help/--help-all: get more help on running XTS List: l/list d/devices: list connected devices and their state l/list packages: list XTS test packages l/list p/plans: list XTS test plans l/list i/invocations: list invocations aka XTS test runs currentlyin progress l/list c/commands: list commands: aka XTS test run commands currently in the queue waiting to be allocated devices l/list r/results: list XTS results currently present in the repository Add: add derivedplan --plan plane_name --session/-s session_id -r [pass/fail/notExecuted/timeout]: derive a plan from the given session Dump: d/dump l/logs: dump the tradefed logs for all running invocations

  • CTS常用命令:
      run cts --plan CTS 全部测试所有plan
      run cts --plan -c class_name(类名) -m method_name(具体方法名)
      run cts --plan -p package_name( 包名) -m method_name(具体方法名)
      继续执行未测试项: run cts --continue-session session_id
      l d 显示连接的设备
      l packages 列出cts 包
      l r 列出results结果
      --disable-reboot 不重启设备
    cts两台平板同时测试:
    连接两台手机后,进入cts控制台:
    run cts --plan CTS --shards 2
    两台手机上会同时跑起CTS测试
    重新测试fail项
    add derivedplan --plan anzhenmrd7_intel_plan -s session_id -r fail
    run cts --plan anzhenmrd7_intel_plan

    cts测试之前几个设置:
      1 测试前执行一次恢复出厂或重新刷机
      2 语言设置为英文
      3 开启USB调试,Stay awake,allow mock locations
      4 adb install android-cts/repository/testcases/CtsDeviceAdmin.apk
      安装完
      db install android-cts/repository/testcases/CtsDeviceAdmin.apk
      应用后在设置-----安全------设备管理器 中勾选receiver 和 receive2
      5 设置正确的日期、时间
      6 将屏幕超时时间设置为 30 分钟以上(最好是从不关机)
      7 关闭屏幕锁定
      8 开始测试前试机子处于home界面
      9 勾选“自动旋转屏幕”,Display -> Auto-rotate screen
      10 勾选“未知来源”,Applications -> Unknown sources
    GTS的常用命令:
      run xts --plan XTS
      run xts --continue-session 0


         
         
         
         
    CTS-tradefed host version 5.1_r2 CTS-tradefed is the test harness for running the Android Compatibility Suite, built on top of the tradefed framework. Available commands and options Host: help: show this message help all: show the complete tradefed help exit: gracefully exit the cts console, waiting till all invocations are complete Run: run cts --plan test_plan_name: run a test plan run cts --package/-p : run a CTS test package run cts --class/-c [--method/-m] : run a specific test class and/ormethod run cts --continue-session session_ID: run all not executed tests from a previous CTS session run cts [options] --serial/-s device_ID: run CTS on specified device run cts [options] --shards number_of_shards: shard a CTS run into given number of independent chunks, to run on multiple devices inparallel run cts --help/--help-all: get more help on running CTS List: l/list d/devices: list connected devices and their state l/list packages: list CTS test packages l/list p/plans: list CTS test plans l/list i/invocations: list invocations aka CTS test runs currentlyin progress l/list c/commands: list commands: aka CTS test run commands currently in the queue waiting to be allocated devices l/list r/results: list CTS results currently present in the repository Add: add derivedplan --plan plane_name --session/-s session_id -r [pass/fail/notExecuted/timeout]: derive a plan from the given session Dump: d/dump l/logs: dump the tradefed logs for all running invocations Options: --disable-reboot : Do not reboot device after running some amount of tests.

         
         
         
         
    XTS-tradefed host version 2.1_r2 Available commands and options Host: help: show this message help all: show the complete tradefed help exit: gracefully exit the xts console, waiting till all invocations are complete Run: run xts --plan test_plan_name: run a test plan run xts --package/-p : run a XTS test package run xts --class/-c [--method/-m] : run a specific test class and/ormethod run xts --continue-session session_ID: run all not executed tests from a previous XTS session run xts [options] --serial/s device_ID: run XTS on specified device run xts [options] --shards number_of_shards: shard a XTS run into given number of independent chunks, to run on multiple devices inparallel run xts --help/--help-all: get more help on running XTS List: l/list d/devices: list connected devices and their state l/list packages: list XTS test packages l/list p/plans: list XTS test plans l/list i/invocations: list invocations aka XTS test runs currentlyin progress l/list c/commands: list commands: aka XTS test run commands currently in the queue waiting to be allocated devices l/list r/results: list XTS results currently present in the repository Add: add derivedplan --plan plane_name --session/-s session_id -r [pass/fail/notExecuted/timeout]: derive a plan from the given session Dump: d/dump l/logs: dump the tradefed logs for all running invocations

  • CTS常用命令:
      run cts --plan CTS 全部测试所有plan
      run cts --plan -c class_name(类名) -m method_name(具体方法名)
      run cts --plan -p package_name( 包名) -m method_name(具体方法名)
      继续执行未测试项: run cts --continue-session session_id
      l d 显示连接的设备
      l packages 列出cts 包
      l r 列出results结果
      --disable-reboot 不重启设备
    cts两台平板同时测试:
    连接两台手机后,进入cts控制台:
    run cts --plan CTS --shards 2
    两台手机上会同时跑起CTS测试
    重新测试fail项
    add derivedplan --plan anzhenmrd7_intel_plan -s session_id -r fail
    run cts --plan anzhenmrd7_intel_plan

    cts测试之前几个设置:
      1 测试前执行一次恢复出厂或重新刷机
      2 语言设置为英文
      3 开启USB调试,Stay awake,allow mock locations
      4 adb install android-cts/repository/testcases/CtsDeviceAdmin.apk
      安装完
      db install android-cts/repository/testcases/CtsDeviceAdmin.apk
      应用后在设置-----安全------设备管理器 中勾选receiver 和 receive2
      5 设置正确的日期、时间
      6 将屏幕超时时间设置为 30 分钟以上(最好是从不关机)
      7 关闭屏幕锁定
      8 开始测试前试机子处于home界面
      9 勾选“自动旋转屏幕”,Display -> Auto-rotate screen
      10 勾选“未知来源”,Applications -> Unknown sources
    GTS的常用命令:
      run xts --plan XTS
      run xts --continue-session 0

    你可能感兴趣的:(Android开发)