浅谈Monkey,MonkeyScript和MonkeyRunner

MonkeySourceScript.java Monkey script是按照一定的语法规则编写有序的用户事件流并适用于monkey命令工具的脚本。包含monkey脚本的常用函数,欢迎下载。 立即下载

一、Monkey

1、什么是Monkey
Monkey是发送伪随机用户事件的工具

2、Monkey在哪里
Monkey在手机系统里面

二、ADB 安卓调试桥(Android Debug Bridge)
adb的作用是什么

  1. 快速更新设备或手机模拟器中的代码,如应用或Android系统升级;
  2. 在设备上运行shell命令;
  3. 管理设备或手机模拟器上的预定端口;
  4. 在设备或手机模拟器上上传下载文件

三、MonkeyScript

  1. MonkeyScript是一组可以被Monkey识别的命令的集合
  2. 可以完成重复固定的操作

四、MonkeyRunner

  1. 提供一系列的API
  2. 可以完成模拟事件及截图操作

五、Monkey和MonkeyRunner的区别

  1. Monkey压力测试工具,MonkeyRunner自动化测试工具
  2. Monkey在adb shell中生成用户或系统的伪随机事件
  3. MonkeyRunner 通过特定的API定义特定额命令和事件控制设备
MonkeyRunner 自动化脚本 monkeyrunner 脚本包括:打印手机屏幕分辨率,阅读页自动翻页功能 下载好以后,首先要确定pc客户端:adb devices 有设备连接 立即下载

相关推荐

新手避坑指南:用Silvaco Atlas搞定GaN HEMT电热仿真的完整流程(附代码解读)

本文详细介绍了使用Silvaco Atlas进行GaN HEMT电热特性仿真的完整流程,特别针对新手常见问题提供避坑指南。从软件环境配置、结构定义、网格划分到物理模型设置,逐步解析关键步骤,并附有代码解读和调试技巧,帮助读者快速掌握GaN器件仿真的核心技术。

weixin_29215815的博客 604

Monkey与MonkeyRunner之间的区别

为了支持黑盒自动化测试的场景,Android SDK提供了monkey和monkeyrunner两个测试工具,这两个测试工具除了名字类似外,还都可以向待测应用发送按键等消息,往往容易产生混淆,以下是他俩的不同之处。 1.monkey运行在设备或者模拟器上边,可以脱离PC运行,其运行时如下图所示。 而monkeyrunner运行在PC上,需要通过服务器/...

weixin_30271335的博客 485

大华摄像头GB28181协议接入EasyCVR全流程(附常见错误排查)

本文详细阐述了大华摄像头通过GB28181协议接入EasyCVR视频管理平台的全流程,涵盖从核心原理、前期参数规划、Web界面配置到平台侧验证的完整步骤。重点针对网络端口、SIP参数配置等关键环节提供了深度排错指南,并总结了设备无法注册、在线不稳定、拉流失败等常见问题的排查思路与解决方案,旨在帮助安防工程师与系统集成商高效完成设备接入与调试。

weixin_29279153的博客 313

MonkeyScript:轻量级脚本语言,让编程更简单

MonkeyScript:轻量级脚本语言,让编程更简单 去发现同类优质开源项目:https://gitcode.com/ MonkeyScript 是一个开源的、面向对象的轻量级脚本语言,其设计目标是提供一种简洁、易学且高效的编程工具。 提供了源代码和详细文档,供开发者们探索和贡献。 技术概述 MonkeyScript 基于词法分析、语法解析和虚拟机执行的设计原则,它具有以下核心特性: 简洁语法...

gitblog_00070的博客 542

Labview_DQMH框架学习1--浅析

本文主要结合一个相对容易理解的例子,阐述 DQMH 框架的工作原理,希望对初学者有一定的帮助。

hrbeuxn的博客 3065

Cadence公司的数字IC设计工具:综合工具(Genus)——(2)

介绍Cadence公司的数字IC设计工具Genus

qq_42922513的博客 1948

Monkey、Monkeyrunner之间的区别

Monkey、Monkeyrunner之间的区别 一.Monkey Monkey是Android中的一个命令行工具,可以运行在模拟器里或实际设备中。它向系统发送伪随机的用户事件流(如按键输入、触摸屏输入、手势输入等),实现对正在开发的应用程序进行压力测试。Monkey测试是一种为了测试软件稳定性、健壮性的快速有效的方法。 Monkey介绍与安装 Monkey程序由Androi...

ainian1627的博客 491

【项目实战】Qt6 录制屏幕、录制声音生成MP4、AVI、MA3等(完整源码,可直接编译使用)

本文将详细介绍如何利用Qt6多媒体模块中的QMediaCaptureSession、QMediaRecorder、QScreenCapture、QAudioInput、QMediaFormat等功能,实现对屏幕和声音的录制,并生成常见的媒体格式文件,如MP4、AVI、MA3等。我们将探讨如何利用这些功能来实现灵活的视频和音频参数设置,以满足不同需求下的录制和生成要求。我们将重点讨论如何配置视频和音频参数,包括分辨率、帧率、编解码器选择、音频采样率、声道设置等。

yegu001的博客 4944

MonkeyScript基础命令介绍

文章目录执行Monkey脚本的命令1、DispatchTrackball命令2、DispatchPointer命令3、DispatchString命令4、LaunchActivity命令5、UserWait命令6、DispatchPress命令 monkey只能对我们的app进行一个随机性的操作,如果我们的需求时要完成一些固定的操作,我们就要用到MonkeyScript功能 执行Monkey脚本的...

enemy_sprites的博客 643

【NTN 卫星通信】使用地面网络和卫星网络接入的终端应用场景

卫星接入有广覆盖的特点, 可以改善地面接入网覆盖或无线条件差的地区(例如多径干扰)的服务可用性。对于高速移动中需要实时业务的终端,如IMS语音/视频会议,可以通过地面接入和卫星接入同时实现与5G系统的双连接,在地面接入网不可用的情况下获得连续可靠的业务。

weixin_43603524的博客 2567

避坑指南:新手爬百度图片3个致命错,改完批量保存本地(亲测有效)

新手爬百度图片的核心是“绕开静态HTML,抓准API接口+处理反爬+提取原图”,改完本文提到的3个核心错,就能稳定批量保存高清图片。这套思路可复用在其他图片网站(如必应图片、360图片),只需修改API接口和参数即可。如果想进一步优化,可添加代理IP池、多线程下载(新手不建议,容易触发反爬)、图片去重等功能!

专注于Python爬虫开发,分享爬虫技巧、项目实战与反爬经验,使用Scrapy、BeautifulSoup等工具,解决数据抓取难题。 1590

Monkey MonkeyScript And MonkeyRunner

monkeyTest Adb : Android Debug Bridge 1、configuration 环境变量 tools ; platform-tools 2、adb devices 确认连接设备 ; 未连接上 adb connect 127.0.0.1:52001 或者 62001 (夜神设备名称)8a791904 (我的手机) 3、adb shell - > cd /system/bin 4、cat monkey - > $base/framework

章鱼哥的博客 381

华为OD机试双机位C卷-恢复数字序列 (Py/Java/C/C++/Js/Go)

华为OD机试双机位C卷 恢复数字序列,提供C语言、Java、C++、Python、Go、JavaScript源码实现,并提供完整思路讲解。华为OD机试 - 恢复数字序列。

qq_45776114的博客 1209

【Monkey】Android APP 压力测试(理论篇):Monkey、MonkeyScript、MonkeyRunner 基础知识

目录 一、App 压力测试 二、Monkey 的介绍 三、ADB 的介绍 四、Monkey、MonkeyScript、MonkeyRunner 的区别 五、MonkeyRunner APIs 的主要接口作用 六、Monkey 压力测试结果分析 一、App 压力测试 (1)压力测试的价值 ①提高软件产品的稳定性 多用户使用产品,在数据比例下,会存在部分用户在使用产...

顾三殇 —— 博客空间(软件测试) 1297

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

InTheHand.Net.Personal+BlueTooth4,蓝牙开发

项目中有蓝牙开发的必备dll,现在网上相关的文档博客不少,有的说的多有的说少,但是却很少有这两个dll,分享一下。

Android 之Monkey、MonkeyScript、MonkeyRunner

本文为慕课网《Android App压力测试》的学习笔记,视频地址 http://www.imooc.com/video/13007 Monkey是发送伪随机用户事件的工具。  MonkeyScript实现自动测试的脚本,是一组可以被Monkey识别的命令集合,可以完成重复固定的操作。不支持截屏。  MonkeyRunner提供一系列api操作。  Monkey与Monk

NeilNiu 885

全球国家地区城市数据

MySQL全球国家地区城市数据报。。。。。。。。。。。。

Monkey

Monkey Script 是一组可以被monkey识别的命令集合,可以完成重复操作。 MoneyRunner提供了一系列的API,可以完成模拟事件及截图操作 获取包名命令: adb logcat | grep START adb shell monkey -p com.wzh.ydbg -v --throttle 300 --pct-touch 3...

dhhxxz8862的博客 152

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Monkey+MonkeyRunner+MonkeyScript 自动化测试工具

Monkey相关 Monkey MonkeyRunner MonkeyScript Monkey Monkey测试是测试软件的稳定性、健壮性的压力测试工具 Monkey测试的对象为应用的程序,时间数据流是随机的,不能自定义 Monkey是Android中的一个命令行工具,存在于手机系统里,可以运行在模拟器里或实际设备中。 Monkey在adb shel

隐言的博客 768

Android测试之:MonkeyScript与MonkeyRunner常用API

MonkeyScript:一组可以被Monkey识别并执行的命令集合。目的是根据我们的需求完成重复固定的测试操作。 MonkeyRunner:提供了一系统的API,通过这些API可以完成模拟事件及截图等操作。与Monkey的区别在于:通过API指定命令来控制设备,而Monkey是在adb shell中,生成伪随机事件,完成测试功能。 —常用MonkeyScript API——-1,DispatchT

true100的专栏 3358

monkey和monkey runner学习笔记

1.获取APP包名: adb shell "logcat | grep START"   I是管道的意思:将上一个命令的输出作为下一个命令的输入。 grep start :抓取start标签的log 信息进行输出 cmp=**/  包名 2.给指定包打压力: adb shell monkey -v(把执行的事件都列出来) -p package 1000 3.monkey高

lilykloss的博客 534

使用Monkey做一次APP的压力测试

1.手工测试场景(聊天为例) 假如说你需要找热火的辣妹聊天 1.查找–>添加–>聊天 模拟事件流 针对手机收到的信息,模拟事件流 查找:touchinput—keyevent- 添加:touchsearch-touchname- 聊天:touchfriend-keyevent 2.自动测试场 手机会收到你点击输入框的Touchinput事件, 点击键盘上的keyEvent的事件(查询的关键词) 收到你点击查找按钮的touchsearch,然后返回一个列表 找到好友之后添加,添加的时候手机收到to

我爱柠檬博客 759

移动端app性能测试——monkey

一、压力测试 monkey MonkeyScript MonkeyRunner adb shell monkey 1000 adb logcat | gerp START获取包名和activity名 adb shell monkey -p 包名 1000 1、throttle参数 adb shell monkey --throttle<millisecond...

diancheng3162的博客 358

monkey与monkeyrunner比较

1、monkey:一款通过命令行来对我们APP进行测试的工具,可以运行在模拟器里或真机上。它向系统发送伪随机的用户事件流,模拟用户操作,实现对正应用程序进行压力测试。 三个事件:动作事件、点击、拖拽 重点:坐标的获取 缺点:坐标不变,但是实际位置可变,这对于测试带来困扰 2、...

cheshu2796的博客 191

Android App压力测试

前言:写这篇文章的原因呢,一是因为不少同学作为Android开发,很少会自己去做压力测试,不了解相关的技术,不知道压力测试是什么、怎么工作的;二是询问过身边的一些测试同学,他们进行压力测试的时候,很多情况只是执行monkey的随机操作,也有部分同学不会写测试脚本,那么本篇文章就应运而生了! 一、背景 1.为什么要进行压力测试? 我们都知道一款产品上线之前都需要进行的一步操作就是测试验收,那么人...

我是紫色紫色的专栏 2万+

MonkeyScript测试命令集合

MonkeyScript:(不支持截屏) 可以被Monkey识别的集合命令 可以完成重复固定的操作 MonkeyRunner(支持截屏操作) 提供一系列API,可以完成模拟事件和截屏操作 Monkey:在adb shell中生成用户或系统的伪随机事件 MonkeyRunner:通过API定义特定命令和事件控制设备 MonkeyRunnerApis: Monkey...

weixin_30339969的博客 96

cpu压力测试 Android,Android App 压力测试方法(Monkey)

一.为什么要开展压力测试a.提高产品的稳定性;b.提高产品的留存率二.什么时候开展压力测试a.首轮功能测试通过后;b.下班后的夜间进行三.7个基础知识(理论部分)3.1 手动测试场景与自动测试场景3.2 Monkey测试工具介绍Monkey是发送伪随机用户事件的工具;Monkey在手机系统里;Monkey需要借助ADB使用;3.3 MonkeyScript测试命令集合介绍3.4 异常测试结果分析四...

weixin_36140358的博客 1033
上一篇: 前言
下一篇: MonkeyRunner APIs
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值