与Android的appium UI自动化测试 [英] Android UI automation test with appium

查看:163
本文介绍了与Android的appium UI自动化测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是工作在几个星期的Andr​​oid UI自动化测试。我robotium想在一个时间,现在我想改变appium框架。我的问题是:

I just working on android UI automation test in few weeks. I tried with robotium in a time and now I want change to appium framework. And my question are:


  1. 我读了appium是一个测试工具来测试网页视图的应用程序。因此,如何在其他应用程序,是不是web视图的应用程序?

  2. 我可以在genymotion运行appium测试?

  3. 任何其他工具,我需要用appium(硒或东西)安装?

修改
当我尝试使用了sudo的安装appium我得到这个错误

Edit When I try to install appium with out sudo I got this error

ERR!错误:EACCES,断开链接
  /Users//appium/node_modules/.bin/instruments-client.js

ERR! Error: EACCES, unlink '/Users//appium/node_modules/.bin/instruments-client.js'

NPM ERR! {[错误:EACCES,断开链接
  /Users//appium/node_modules/.bin/instruments-client.js']

npm ERR! { [Error: EACCES, unlink '/Users//appium/node_modules/.bin/instruments-client.js']

NPM ERR!错误号:3,

npm ERR! errno: 3,

NPM ERR! code:'EACCES,

npm ERR! code: 'EACCES',

NPM ERR!路径:
  /Users//appium/node_modules/.bin/instruments-client.js'}

npm ERR! path: '/Users//appium/node_modules/.bin/instruments-client.js' }

NPM ERR!

NPM ERR!请重试运行此命令,作为根/管理员。

npm ERR! Please try running this command again as root/Administrator.

NPM ERR!系统达尔文13.1.0

npm ERR! System Darwin 13.1.0

NPM ERR!命令/usr/local/Cellar/node/0.10.26/bin/node
  在/ usr / local / bin目录/故宫联系appium-uiauto

npm ERR! command "/usr/local/Cellar/node/0.10.26/bin/node" "/usr/local/bin/npm" "link" "appium-uiauto"

NPM ERR! CWD /用户/ yaphatak / appium

npm ERR! cwd /Users/yaphatak/appium

NPM ERR!节点-v v0.10.26

npm ERR! node -v v0.10.26

NPM ERR! NPM -v 1.4.3

npm ERR! npm -v 1.4.3

NPM ERR!路径
  /Users//appium/node_modules/.bin/instruments-client.js

npm ERR! path /Users//appium/node_modules/.bin/instruments-client.js

NPM ERR! code EACCES

npm ERR! code EACCES

NPM ERR!错误号3

npm ERR! errno 3

NPM ERR!堆栈错误:EACCES,断开链接
  /Users//appium/node_modules/.bin/instruments-client.js

npm ERR! stack Error: EACCES, unlink '/Users//appium/node_modules/.bin/instruments-client.js'

NPM ERR!

NPM ERR!其他记录详细信息中可以找到:

npm ERR! Additional logging details can be found in:

NPM ERR! /Users//appium/npm-debug.log

npm ERR! /Users//appium/npm-debug.log

NPM ERR!不正常code 0

npm ERR! not ok code 0

然后我使用sudo尝试然后运行 appium 我得到这个错误

Then I try with sudo then run appium I got this error

错误:如果使用或使用sudo安装Appium将无法工作。请
  重新运行/安装作为非root用户。如果你有Appium使用安装
   sudo的NPM安装-g 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可以测试非web视图的应用程序。在 Appium介绍页面的第一行说:

1- Yes, Appium can test non-webview apps. The first line on the Appium introduction page says:

Appium是一个开源的工具,你可以用它来自动完成的移动本地 移动网络移动混合动力车在iOS和Android 应用程序平台。

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工作。请参见这里一个例子。

2- Yes, Appium should work with Genymotion. See here for an example.

3你的测试将需要引用硒库的才能与Appium沟通。

3- Your tests will need to reference the Selenium libraries in order to communicate with Appium.

这篇关于与Android的appium UI自动化测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆