微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

使用Appium的Android UI自动化测试

我只是在几周内从事android UI自动化测试.我曾经尝试过使用robotium,现在我想更改为appium框架.我的问题是:

>我读到appium是测试webview应用程序的测试工具.那么不是Webview应用程序的其他应用程序呢?
>我可以在genymotion上从appium运行测试吗?
>我需要与appium(硒或其他东西)一起安装其他工具吗?

编辑
当我尝试在没有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通信.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐