android 4.1 UI 工具测试的新利器, uiautomator

大家快去升级JLB 4.2吧,uiautomator正式发布了

传送门:http://blog.csdn.net/robinzhou/article/details/8447058

具体功能,还没有试,之后会更新

源代码: "uiautomator.zip" http://vdisk.weibo.com/s/ajwux


Usage: uiautomator <subcommand> [options]

Available subcommands:

help: displays help message

runtest: executes UI automation tests
    runtest <class spec> [options]
    <class spec>: <JARS> [-c <CLASSES> | -e class <CLASSES>]
      <JARS>: a list of jar file containing test classes and dependencies. If
        the path is relative, it's assumed to be under /data/local/tmp. Use
        absolute path if the file is elsewhere. Multiple files can be
        specified, separated by space.
      <CLASSES>: a list of test class names to run, separated by comma. To
        a single method, use TestClass#testMethod format. The -e or -c option
        may be repeated.
    options:
      --nohup: trap SIG_HUP, so test won't terminate even if parent process
               is terminated, e.g. USB is disconnected.
      -e debug [true|false]: wait for debugger to connect before starting.
      -e runner [CLASS]: use specified test runner class instead. If
        unspecified, framework default runner will be used.
      -e <NAME> <VALUE>: other name-value pairs to be passed to test classes.
        May be repeated.

dump: creates an XML dump of current UI hierarchy
    dump [file]
      [file]: the location where the dumped XML should be stored, default is
      /storage/sdcard0/window_dump.xml

events: prints out accessibility events until terminated

你可能感兴趣的:(android,UI,测试,Class,工具,hierarchy)