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 ...
随机推荐
- C++第三次作业:作用域
作用域的定义 作用域是一个标识符在程序正文中有效的区域. 1.函数原型作用域 在函数原型声明时形式参数的作用范围就是函数原型作用域. 它是C++程序中最小的作用域. 例: double area(do ...
- TF_RNNCell
参考:链接. RNNCell BasicRNNCell GRUCell BasicLSTMCell LSTMCell MultiRNNCell 抽象类RNNCell 所有的rnncell均继承于RNN ...
- metapath2vec 笔记
Homogeneous networks: representative of singular type of nodes and relationships Challenges: multipl ...
- JS 给数字加三位一逗号间隔的方法
1.方法 function format_number(n) { var b = parseInt(n).toString(); var len = b.length; ) { return b; } ...
- Java程序中实现 MySQL数据库的备份与还原
案例代码: 数据库备份 //mysqldump -h端口号 -u用户 -p密码 数据库 > d:/test.sql --备份D盘 //备份 public static void dataBase ...
- Acwing-203-同余方程(扩展欧几里得)
链接: https://www.acwing.com/problem/content/205/ 题意: 求关于x的同余方程 ax ≡ 1(mod b) 的最小正整数解. 思路: 首先:扩展欧几里得推导 ...
- html上标与下标应用
HTML 标签应用示例: <html> <head> <meta http-equiv="Content-Type" content="te ...
- CF1033D Divisors Pollard-rho
好像卡常,第10个点一直TLE~ Code: #include <bits/stdc++.h> #define ll long long #define ull unsigned long ...
- codeforces412A
Poster CodeForces - 412A The R1 company has recently bought a high rise building in the centre of Mo ...
- hbase hbck
Number of Tables: 7Number of live region servers: 3Number of dead region servers: 0Number of empty R ...