zoukankan      html  css  js  c++  java
  • monkey之monkeyServer

    基本命令:

    adb shell monkey --port 1080 &

    adb forward tcp:1080 tcp:1080

    telnet 127.0.0.1 1080

    启动android端的monkey server,然后将端口转发到pc端,就可以在pc端

    通过telnet连接monkey server

     

    monkeyServerRun.vbs(测试脚本)

    set sh=WScript.CreateObject("WScript.Shell")

    WScript.Sleep 1000

    sh.SendKeys "open 127.0.0.1 1080 {ENTER}"

    WScript.Sleep 1000

    sh.SendKeys "press KEYCODE_3 {ENTER}"

    WScript.Sleep 1000

    sh.SendKeys "press KEYCODE_7 {ENTER}"

    WScript.Sleep 1000

    sh.SendKeys "press KEYCODE_NUMPAD_ADD {ENTER}"

    WScript.Sleep 1000

    sh.SendKeys "press KEYCODE_2 {ENTER}"

    WScript.Sleep 1000

    sh.SendKeys "press KEYCODE_1 {ENTER}"

    WScript.Sleep 1000

    sh.SendKeys "press KEYCODE_NUMPAD_EQUALS {ENTER}"

    WScript.Sleep 1000

    sh.SendKeys "done {ENTER}"

    WScript.Sleep 1000

    使用monkey服务端测试应用时时,需事先连上手机端,打开应用

    monkeySever.bat(批处理脚本)

    adb forward tcp:1080 tcp:1080

    adb shell am start -n com.android.calculator2/com.android.calculator2.Calculator

    start telnet.exe

    cscript //nologo .monkeyServerRun.vbs

  • 相关阅读:
    java集合的简单用法
    数据结构
    数据结构
    数据结构
    数据结构
    软件工程第三次作业
    软件工程第三次作业
    软件工程第三次作业
    软件工程第三次作业
    Linux 开发之线程条件锁那些事
  • 原文地址:https://www.cnblogs.com/stin/p/8358825.html
Copyright © 2011-2022 走看看