Using Android monkeyrunner from Eclipse, both in Windows and Linux!
来源:互联网 发布:代理服务器ip和端口 编辑:程序博客网 时间:2024/05/01 10:31
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) byEclipse 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:
- Click “Apply” and wait it finish. Press “OK”
- 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!
- Using Android monkeyrunner from Eclipse, both in Windows and Linux!
- Using Android monkeyrunner from Eclipse in Windows
- cocos2dx linux and android project in eclipse
- find element in both array and vector using one myfind function
- Using SQLite from Shell in Android
- using cppunit in eclipse ide on windows
- Class _NSZombie_xxxxxxx is implemented in both ?? and?
- Install Both Python2 and Python3 in Jupyter
- Using AlarmManager and BroadcastReceiver in Android
- MonkeyRunner_Click on a View contains specified text using monkeyrunner and Android ViewClient
- Using Windows XP Visual Styles and PrintWindow in Windows Applications
- Using the sed editor in Linux - from Oracle Tech Network
- Using Boost Libraries in Windows Store and Phone Applications
- Accepting connections from both IPv6 and IPv4 clients
- Ping/SSH a Ubuntu machine using hostname from Windows/Linux
- I will write articles both in chinese and in english
- How to compile a dlib example using eclipse in windows?
- 从未谋面只闻其名——缅怀张孝祥老师!
- MFC INI文件读写
- ChartDirector 5.0 for python 笔记【10】CDML 标记语言
- php 截取UTF-8 GBK汉字
- SimpleOnGestureListener中各种Touch事件
- Using Android monkeyrunner from Eclipse, both in Windows and Linux!
- 12.01.01 ~ 12.01.07
- Linux设备驱动程序0-hello world
- Oracle设置 tnslsnr口令的弊端
- HDOJ water 2023
- 递归算法--进制数实现
- 两份涉及到ioctl移植为ioctlsocket的源码。
- 自定义的Trace
- 操作DataTable数据实现排序、检索、合并、分页、统计等功能