几周后我将致力于 Android UI 自动化测试。我曾经尝试过使用 robotium,现在我想更改为 appium 框架。我的问题是:
- 我听说 appium 是一个测试 webview 应用程序的测试工具。那么另一个不是 webview 应用程序的应用程序呢?
- 我可以在 genymotion 上从 appium 运行测试吗?
- 我需要用 appium(selenium 或其他东西)安装任何其他工具吗?
编辑 当我尝试不使用 sudo 安装 appium 时出现此错误
ERR! Error: EACCES, unlink '/Users//appium/node_modules/.bin/instruments-client.js'
npm ERR! { [Error: EACCES, unlink '/Users//appium/node_modules/.bin/instruments-client.js']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/Users//appium/node_modules/.bin/instruments-client.js' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 13.1.0
npm ERR! command "/usr/local/Cellar/node/0.10.26/bin/node" "/usr/local/bin/npm" "link" "appium-uiauto"
npm ERR! cwd /Users/yaphatak/appium
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! path /Users//appium/node_modules/.bin/instruments-client.js
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, unlink '/Users//appium/node_modules/.bin/instruments-client.js'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users//appium/npm-debug.log
npm ERR! not ok code 0
然后我尝试使用 sudo 然后运行 appium
我得到了这个错误
error: Appium will not work if used or installed with sudo. Please rerun/install as a non-root user. If you had to install Appium using
sudo npm install -g appium
, the solution is to reinstall Node using a method (Homebrew, for example) that doesn't require sudo to install global npm packages."
有什么帮助吗?
最佳答案
1- 是的,Appium 可以测试非 webview 应用程序。第一行在Appium introduction page说:
Appium is an open-source tool you can use to automate mobile native, mobile web, and mobile hybrid applications on iOS and Android platforms.
2- 是的,Appium 应该与 Genymotion 一起使用。参见 here举个例子。
3- 您的测试需要引用 Selenium libraries以便与 Appium 通信。
关于使用 appium 进行 Android UI 自动化测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24199864/