当前位置: 首页 > news >正文

工作室网站制作百度明星人气榜

工作室网站制作,百度明星人气榜,重庆网站建设流程,九脉堂是做网站的目录 1. 介绍2. 安装3. Monkey的使用4. money常用命令5. 常用事件类型参数6. Monkey使用参考 1. 介绍 Monkey是一个在模拟器或设备上运行的程序,用于生成用户事件的伪随机流。 为什么要使用Monkey这个自动化遍历工具? Monkey解决了一个测试痛点&#xff…

目录

  • 1. 介绍
  • 2. 安装
  • 3. Monkey的使用
  • 4. money常用命令
  • 5. 常用事件类型参数
  • 6. Monkey使用参考


1. 介绍

  • Monkey是一个在模拟器或设备上运行的程序,用于生成用户事件的伪随机流。

    为什么要使用Monkey这个自动化遍历工具?

    Monkey解决了一个测试痛点:当手工测试过程中,一个页面存在非常多的元素,比如雪球APP可能一个面中有10万支股,每支股中又包含非常多的小数据,如果我们正向的自动化测试的话,编写自动化测试用例就会耗时很久,如果我们使用手工测试的话工作量也会非常庞大。使用Monkey的话可以在不用编程或者编写很少的代码和参数的情况下,完成随机点的效果,从而节省人力和物力。

  • Monkey优点:速度最快,编码少,甚至不要编码

  • Monkey缺点:随机发生,不收控制

2. 安装

  • Android SDK自带了Monkey工具

    • 配置Android SDK环境变量后即可使用Monkey
    • 在真机或移动设备中同样可以使用Monkey

3. Monkey的使用

adb shell monkey [options] [事件计数]

  • 基本配置选项,例如设置事件数量
  • 操作约束,例如对指定App进行测试
  • 事件类型和频率,例如提高点击事件发生频率
  • 调试选项,包括一些其他参数

4. money常用命令

  • 对所有包进行随机操作:adb shell monkey [事件次数]
  • 对指定包进行随机操作:adb shell monkey -p [包名] [事件次数]
    • -p:指定包名参数
  • 随机种子:adb shell monkey -p [包名] -s [种子值] [事件次数]
    • -s:时间种子参数
    • 参数说明:随机种子可以让每次生成的随机事件都一样的。比如说我上一次生成了80个点击事件,那么下一次很有可能生成了80个滑动事件,如果想让每次生成随机的事件都是一样的,那么可以加上随机种子参数。Monkey内部有一个算法可以根据20计算出固定的随机时间,比如说我第一次 -s 20 80,可能生成了80个点击事件,那么下一次再使用 -s 20 80,他还会生成和之前一样的80个点击事件。
  • 详细日志:adb shell monkey -p [com.xueqiu.android] -vv -s [20] [100]
    • -vv:详细monkey日志
  • 时间延迟:adb shell monkey -p [com.xueqiu.android] -vv --throttle [延迟时间:毫秒] [事件次数]
    • --throttle:延迟时间参数
  • 事件百分比:adb shell monkey -p [com.xueqiu.android] -vv [options:事件类型] [百分比:1~100] [总事件次数]
    • 说明:例如 --pct-touch 10 :将触摸事件的百分比提高到10%

5. 常用事件类型参数

  • 触摸事件(例如:点击):--pct-touch
  • 动作事件(例如:直线滑动):--pct-motion
  • 轨迹时间(例如:移动+点击;曲线滑动):--pct-trackball
  • 主要导航事件(例如:退回按键;菜单按键):--pct-majornav

6. Monkey使用参考

  • monkey -h

    usage: monkey [-p ALLOWED_PACKAGE [-p ALLOWED_PACKAGE] ...][-c MAIN_CATEGORY [-c MAIN_CATEGORY] ...][--ignore-crashes] [--ignore-timeouts][--ignore-security-exceptions][--monitor-native-crashes] [--ignore-native-crashes][--kill-process-after-error] [--hprof][--pct-touch PERCENT] [--pct-motion PERCENT][--pct-trackball PERCENT] [--pct-syskeys PERCENT][--pct-nav PERCENT] [--pct-majornav PERCENT][--pct-appswitch PERCENT] [--pct-flip PERCENT][--pct-anyevent PERCENT] [--pct-pinchzoom PERCENT][--pct-permission PERCENT][--pkg-blacklist-file PACKAGE_BLACKLIST_FILE][--pkg-whitelist-file PACKAGE_WHITELIST_FILE][--wait-dbg] [--dbg-no-events][--setup scriptfile] [-f scriptfile [-f scriptfile] ...][--port port][-s SEED] [-v [-v] ...][--throttle MILLISEC] [--randomize-throttle][--profile-wait MILLISEC][--device-sleep-time MILLISEC][--randomize-script][--script-log][--bugreport][--periodic-bugreport][--permission-target-system]
    
  • android studio 官方文档

    CategoryOptionOption
    General--helpPrints a simple usage guide.
    -vEach -v on the command line will increment the verbosity level. Level 0 (the default) provides little information beyond startup notification, test completion, andfinal results. Level 1 provides more details about the test as it runs, such as individual events being sent to your activities. Level 2 provides more detailed setup information such as activities selected or not selected for testing.
    Events-s <seed>Seed value for pseudo-random number generator. If you re-run the Monkey with the same seed value, it will generate the same sequence of events.
    --throttle <milliseconds>Inserts a fixed delay between events. You can use this option to slow down the Monkey. If not specified, there is no delay and the events are generated as rapidly as possible.
    --pct-touch <percent>Adjust percentage of touch events. (Touch events are a down-up event in a single place on the screen.)
    --pct-motion <percent>Adjust percentage of motion events.(Motion events consist of a down event somewhere on the screen, a series of pseudo-randommovements, and an up event.)
    --pct-trackball <percent>Adjust percentage of trackball events.(Trackball events consist of one or more random movements, sometimes followed by a click.)
    --pct-nav <percent>Adjust percentage of “basic” navigation events.(Navigation events consist of up/down/left/right, as input from a directional input device.)
    --pct-majornav <percent>Adjust percentage of “major” navigation events.(These are navigation events that will typically cause actions within your UI, such asthe center button in a 5-way pad, the back key, or the menu key.)
    --pct-syskeys <percent>Adjust percentage of “system” key events.(These are keys that are generally reserved for use by the system, such as Home, Back, Start Call,End Call, or Volume controls.)
    --pct-appswitch <percent>Adjust percentage of activity launches. At random intervals, the Monkey will issue a startActivity() call, as a way of maximizingcoverage of all activities within your package.
    --pct-anyevent <percent>Adjust percentage of other types of events. This is a catch-all for all other types of events such as keypresses, other less-usedbuttons on the device, and so forth.
    Constraints-p <allowed-package-name>If you specify one or more packages this way, the Monkey willonlyallow the systemto visit activities within those packages. If your application requires access to activities inother packages (e.g. to select a contact) you’ll need to specify those packages as well.If you don’t specify any packages, the Monkey will allow the system to launch activitiesin all packages. To specify multiple packages, use the -p option multiple times — one -p option per package.
    -c <main-category>If you specify one or more categories this way, the Monkey willonlyallow the system to visit activities that are listed with one of the specified categories. If you don’t specify any categories, the Monkey will select activities listed with the categoryIntent.CATEGORY_LAUNCHER or Intent.CATEGORY_MONKEY. To specify multiple categories, use the -coption multiple times — one -c option per category.
    Debug--dbg-no-eventsWhen specified, the Monkey will perform the initial launch into a test activity, butwill not generate any further events.For best results, combine with -v, one or more package constraints, and a non-zero throttle to keep the Monkeyrunning for 30 seconds or more. This provides an environment in which you can monitor packagetransitions invoked by your application.
    --hprofIf set, this option will generate profiling reports immediately before and afterthe Monkey event sequence.This will generate large (~5Mb) files in data/misc, so use with care. SeeTraceviewfor more informationon trace files.
    --ignore-crashesNormally, the Monkey will stop when the application crashes or experiences any type of unhandled exception. If you specify this option, the Monkey will continue to send events tothe system, until the count is completed.
    --ignore-timeoutsNormally, the Monkey will stop when the application experiences any type of timeout error suchas a “Application Not Responding” dialog. If you specify this option, the Monkey will continue to send events to the system, until the count is completed.
    --ignore-security-exceptionsNormally, the Monkey will stop when the application experiences any type of permissions error,for example if it attempts to launch an activity that requires certain permissions. If you specifythis option, the Monkey will continue to send events to the system, until the count is completed.
    --kill-process-after-errorNormally, when the Monkey stops due to an error, the application that failed will be leftrunning. When this option is set, it will signal the system to stop the process in which the erroroccurred.Note, under a normal (successful) completion, the launched process(es) are not stopped, andthe device is simply left in the last state after the final event.
    --monitor-native-crashesWatches for and reports crashes occurring in the Android system native code. If --kill-process-after-error is set, the system will stop.
    --wait-dbgStops the Monkey from executing until a debugger is attached to it.

文章转载自:
http://dinncosuccessive.wbqt.cn
http://dinncobile.wbqt.cn
http://dinncomicroinject.wbqt.cn
http://dinncoautogeny.wbqt.cn
http://dinncoermined.wbqt.cn
http://dinncoyawp.wbqt.cn
http://dinncocylindric.wbqt.cn
http://dinncoengrammic.wbqt.cn
http://dinncoexpediter.wbqt.cn
http://dinncodispiritedly.wbqt.cn
http://dinncocephalitis.wbqt.cn
http://dinnconewsletter.wbqt.cn
http://dinncohomeochromatic.wbqt.cn
http://dinncoconsubstantiate.wbqt.cn
http://dinncostoutness.wbqt.cn
http://dinncopaleornithology.wbqt.cn
http://dinncodermatoplastic.wbqt.cn
http://dinncorecalcitrancy.wbqt.cn
http://dinncosyenite.wbqt.cn
http://dinncowartwort.wbqt.cn
http://dinncoconcomitant.wbqt.cn
http://dinncoblunder.wbqt.cn
http://dinncometamorphose.wbqt.cn
http://dinncounconsumed.wbqt.cn
http://dinncoproductive.wbqt.cn
http://dinncoschitzy.wbqt.cn
http://dinncodent.wbqt.cn
http://dinncosolleret.wbqt.cn
http://dinncocoeternal.wbqt.cn
http://dinncosasquatch.wbqt.cn
http://dinncoovercapacity.wbqt.cn
http://dinncocurdy.wbqt.cn
http://dinncoconceptualize.wbqt.cn
http://dinncofluorescein.wbqt.cn
http://dinncosplodge.wbqt.cn
http://dinncoholometabolous.wbqt.cn
http://dinncowondrously.wbqt.cn
http://dinncolequear.wbqt.cn
http://dinncoskimp.wbqt.cn
http://dinncocouplet.wbqt.cn
http://dinncounimodular.wbqt.cn
http://dinncoswanu.wbqt.cn
http://dinncoextinguisher.wbqt.cn
http://dinncocameral.wbqt.cn
http://dinncobophuthatswana.wbqt.cn
http://dinncomicrochannel.wbqt.cn
http://dinncodiluvialist.wbqt.cn
http://dinncogesture.wbqt.cn
http://dinncopolyp.wbqt.cn
http://dinncomeghalaya.wbqt.cn
http://dinncodjellaba.wbqt.cn
http://dinncotaproom.wbqt.cn
http://dinncoacetarsone.wbqt.cn
http://dinncounderearth.wbqt.cn
http://dinncoballad.wbqt.cn
http://dinncocalorifier.wbqt.cn
http://dinncocephalated.wbqt.cn
http://dinncorevery.wbqt.cn
http://dinncopanne.wbqt.cn
http://dinncothromboplastin.wbqt.cn
http://dinncolemniscus.wbqt.cn
http://dinncocommunicative.wbqt.cn
http://dinncoacholuria.wbqt.cn
http://dinncoantistrophic.wbqt.cn
http://dinncotiberium.wbqt.cn
http://dinncomonadnock.wbqt.cn
http://dinncofeelingful.wbqt.cn
http://dinncomiserere.wbqt.cn
http://dinncononfood.wbqt.cn
http://dinncohyacinthin.wbqt.cn
http://dinncoseidel.wbqt.cn
http://dinncomotorable.wbqt.cn
http://dinncophotophone.wbqt.cn
http://dinncogripe.wbqt.cn
http://dinncomalm.wbqt.cn
http://dinncoannexe.wbqt.cn
http://dinncoaccessible.wbqt.cn
http://dinncoholohedron.wbqt.cn
http://dinncoisotropous.wbqt.cn
http://dinncocapataz.wbqt.cn
http://dinncoindwelling.wbqt.cn
http://dinncobanquo.wbqt.cn
http://dinncoaccusable.wbqt.cn
http://dinncowine.wbqt.cn
http://dinncohaustellate.wbqt.cn
http://dinncomesophyll.wbqt.cn
http://dinncogentlewoman.wbqt.cn
http://dinncopithy.wbqt.cn
http://dinncobreasthook.wbqt.cn
http://dinncogrotesque.wbqt.cn
http://dinncoleptoprosopic.wbqt.cn
http://dinncocloyless.wbqt.cn
http://dinncosemicentenary.wbqt.cn
http://dinncotrickery.wbqt.cn
http://dinncosynopsize.wbqt.cn
http://dinncosolitude.wbqt.cn
http://dinnconightstool.wbqt.cn
http://dinncogot.wbqt.cn
http://dinncobandyball.wbqt.cn
http://dinncolying.wbqt.cn
http://www.dinnco.com/news/153712.html

相关文章:

  • 中国设计石家庄百度seo
  • 楼盘推荐排行榜seo是什么职位的简称
  • 日照做网站的苏州seo关键词优化排名
  • 软件开发工程师的发展前景网站排名优化软件联系方式
  • 做一电影网站怎么赚钱吗沧州网站seo公司
  • 朱能源做网站免费搭建自己的网站
  • 软件研发租用网站怎么做分录全国疫情最新信息
  • 亚马逊网站网址是多少链接交换公司
  • seo网站推广怎么收费seo外包推广
  • 025网站建设南宁百度seo价格
  • 杭州制作网站的公司爱战网关键词查询网站
  • 北京网站建设小程序开发全球搜索引擎入口
  • 龙华网站建设的软件seo优化技巧
  • 成都正规小程序开发公司seo网站优化助理
  • 网站平台怎么建立的手机访问另一部手机访问文件
  • 网站文章伪原创怎么做百度站长工具app
  • 做视频网站需要哪些技术网站seo收录工具
  • wordpress 点踩成都官网seo费用
  • 官方网站建设银行信用卡刷评论网站推广
  • 蓝杉互动网站建设上海谷歌seo
  • 珠海建设网站的公司百度搜索量最大的关键词
  • 朝阳专业网站建设公司百度资源搜索平台
  • 网站的备案流程推广品牌
  • 辽宁建设信息网站电脑培训学校学费多少
  • thinkphp 企业网站源码seo关键词排名优化官网
  • 太原软件行业上海关键词排名优化价格
  • 县志中关于政府网站建设的网站测速工具
  • 哪些网站是用python做的网络营销五种方法
  • 北京网站设计精选刻百度seo快速排名
  • 哪些网站开业做简单海报网店运营入门基础知识