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

  • 相关阅读:
    第一章 zookeeper基础概念
    ntp服务
    nfs与dhcp服务
    samba、ftp和ssh服务
    Linux系统的RAID磁盘阵列
    Linux系统中lvm简介
    Linux系统中的计划任务
    Linux权限管理
    Linux用户及组管理
    简谈OSI七层模型(网络层)
  • 原文地址:https://www.cnblogs.com/stin/p/8358825.html
Copyright © 2011-2022 走看看