Using Android monkeyrunner from Eclipse, both in Windows and Linux!
This time I want to use English to make this article useful for all others in the world:)
As you know, Android MonkeyRunner is a good testing tool, but we could only develop monkeyrunner under a text editor like Vim, emacs, etc.
Diego Torres Milano wrote a blog to make Monkeyrunner running on Eclipse, he had done that on Linux. But according to his article, he mislead guys thinking that his solution also works on Windows. But after serveral tries by myself and others’ comments, it does not work in Windows at all.
Here I found a solution which also works on Windows(I have tried it by myself). And I believe that it also works on Linux, as the solution does not include any platform independent mechanism. Here we go
- Install/Update latest PyDev (2.2.4 at present, I think it does not relate to the PyDev version) by Eclipse Marketplace or direct install link, see guide here
- Extract Lib folder in ANDROID_SDK\tools\lib\jython.jar using 7-Zip/WinRAR to ANDROID_SDK\tools\lib folder, which would be like ANDROID_SDK\tools\lib\Lib
- Add a Jython Interpreter under Window>Preferences>PyDev>Interpreter – Jython. Using the jython.jar from Android SDK\tools\lib folder.
- Please notice that adding Android SDK\tools\lib and monkeyrunner.jar in Libraries.
See snapshot below:
5. Click “Apply” and wait it finish. Press “OK”
6. Now you can use this new MonkeyRunner Interpreter to set up a PyDev project. But please make sure to choose “Jython” and using Grammar version “2.5″ as Jython itself is not catching up with Python. The latest Jython is 2.5.2, but Android SDK uses 2.5.0. It’s OK to replace the old one with the latest one. That’s another story.
Snapshot of project setup:
Now you could write MonkeyRunner script with convenient features like auto-completion, grammmer error notice etc. Have fun:)
Notice: you cannot click the Run button to execute monkeyrunner script, it will not use monkeyrunner.bat to execute.
Using Android monkeyrunner from Eclipse, both in Windows and Linux!的更多相关文章
- monkeyrunner之eclipse中运行monkeyrunner脚本之环境搭建(四)
monkeyrunner脚本使用Python语法编写,但它实际上是通过Jython来解释执行. Jython是Python的Java实现,它将Python代码解释成Java虚拟机上的字节码并执行,这种 ...
- 解决配置android开发环境eclipse获取ADT获取不到,一直"Pending"
在安装完Android SDK后eclipse要获取ADT, 可是由于GFW的存在, eclipse经常无法从http://dl-ssl.google.com/android/eclipse 获取到任 ...
- 配置android开发环境eclipse获取ADT获取不到
在安装完Android SDK后eclipse要获取ADT, 可是由于GFW的存在, eclipse经常无法从http://dl-ssl.google.com/android/eclipse 获取到任 ...
- Android开发环境——Eclipse ADT相关内容汇总
Android开发环境将分为SDK相关内容.Eclipse ADT相关内容.模拟器AVD相关内容.调试器DDMS相关内容.日志LogCat相关内容.连接驱动ADB相关内容.内存泄露检测工具MAT相关 ...
- 解决方案:android monkeyrunner:Timeout while trying to create chimp mananger(device = MonkeyRunner.waitForConnection()一直报错的问题)
monkeyrunner在执行device = MonkeyRunner.waitForConnection()一直报错的问题 (或者[main] [com.android.chimpchat.adb ...
- 转载:monkeyrunner之eclipse中运行monkeyrunner脚本之环境搭建(四)
转载自:lynnLi 的monkeyrunner之eclipse中运行monkeyrunner脚本之环境搭建(四) monkeyrunner脚本使用Python语法编写,但它实际上是通过Jython来 ...
- Android Studio VS Eclipse (还在用Eclipse?你OUT了!)
转载请注明本文出自大苞米的博客(http://blog.csdn.net/a396901990).谢谢支持! 公司派来一个去美国參加完AnDevCon大会的来给我们分享大会上学习的内容. AnDevC ...
- Android studio导入eclipse项目且不改变目录结构
Android studio的安装与配置论坛当中已经有很多在此就不在细说了,现在开始说下如何在Android studio当中导入eclipse的项目且不改变其目录结构和配置,让使用eclipse的同 ...
- Android Studio导入Eclipse项目和一些常见的问题
Android Studio版本 Eclipse项目工程:一个主工程,一个Emojicon依赖库. 有两种方式导入Eclipse工程: 1.兼容Eclipse 2.全新的Android Gradle ...
随机推荐
- 【NOIP2012】同余方程
原题: 求关于xx的同余方程ax≡1(mod b)的最小正整数解. 裸题 当年被这题劝退,现在老子终于学会exgcd了哈哈哈哈哈哈哈哈 ax≡1(mod b) => ax=1+by => ...
- 关于Spring MVC写的不错的几篇博客
关于Spring MVC写的不错的几篇博客 https://my.oschina.net/kolbe/blog/509810 https://www.cnblogs.com/sunniest/p/45 ...
- linux内核 同步
锁 linux本身实现了集中锁机制,各种锁机制之间的差别是,当锁已经被其他线程持有的时候,一些锁使用自旋的方式来等待,另外一些锁会当当前线程改变为睡眠状态然后等待被唤醒. 锁的争用 如果一个锁处于高度 ...
- 逻辑卷管理(LVM)
LVM:Logical Volume Management 逻辑卷管理 LVM是建立在硬盘和分区之上的一个逻辑层,来提高磁盘分区管理的灵活性. 传统磁盘管理:我们上层是直接访问文件系统,从而对底层的物 ...
- vue插件——滚动监听 vue-scrollwatch
造轮子的目的: 做项目的时候需要一个滚动监听的功能,html结构已经都写好了,不想使用vue组件的方式来写,因为不想改造html结构,于是花了几个小时做了一个简单的,使用vue指令方式来做的,项目上够 ...
- .Net界面开发神器—DevExpress官方汉化包免费下载!还在等什么?
点击获取DevExpress v19.1.7新版试用下载 DevExpress Localization Service允许您创建一组自定义的附属程序集,要将语言包添加到程序集中,请查看本文中为大家列 ...
- django之表多对多建立方式、form组件、钩子函数 08
目录 多对多三种创建方式 1.全自动(用ManyToManyField创建第三张表) 2.纯手写 3.半自动 form组件 引入 form组件的使用 forms组件渲染标签 form表单展示信息 fo ...
- jquery checked选择器 语法
jquery checked选择器 语法 作用::checked 选择器选取所有选中的复选框或单选按钮.直线电机参数 语法:$(":checked") jquery checked ...
- java常见问题 ——编辑报错1
报错1 The method add(CatNode) in the type List<CatNode> is not applicable for the arguments (Str ...
- pdf缩略图生成上传解决方案
前言:因自己负责的项目(jetty内嵌启动的SpringMvc)中需要实现文件上传,而自己对java文件上传这一块未接触过,且对 Http 协议较模糊,故这次采用渐进的方式来学习文件上传的原理与实践. ...