如何设置Appium在Ubuntu为Android [英] How to setup Appium in Ubuntu for android

查看:208
本文介绍了如何设置Appium在Ubuntu为Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新的 appium (自动测试技术)。

I am new in appium(automation testing technology).

我使用运行Ubuntu Linux操作系统的PC。

I'm using a PC running Ubuntu Linux.

我已经寻找关于这个话题,但我还没有得到任何有用的教程。任何人都可以点我正确的文档?

I have searched about this topic but I have not got any useful tutorial. Can anyone point me to the right documentation?

推荐答案

我敢肯定,你会发现很多关于这个教程(这将仅适用于Android的,因为你需要一个OSX中做iOS的),但在这里就是我们做的:

I'm sure you will find plenty of tutorials on this (and this will only work for android since you would need an OSX box to do iOS) but here is what we did:

安装nodejs / NPM

sudo apt-get update
sudo apt-get install -y python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs

安装咕噜-CLI

Install grunt-cli:

npm install -g grunt-cli

如果你遇到一个问题,它不能够安装在一个目录,请

If you run into an issue about it not being able to install in a directory, do this.

安装Appium

Install Appium:

npm install -g appium

设置在的.bashrc 文件中的符号链接Appium:

Set up a symlink in your .bashrc file for Appium:

ln -s /path/to/appium.js /usr/bin/appium

测试,以确保它可以通过在终端上运行 appium 运行。输出应该是这样的:

Test to make sure it can run by running appium in your terminal. The output should be something like:

info: Welcome to Appium v0.16.0 (REV 292d265edd9c7aaf96f165009285c814b218363d)
info: Appium REST http interface listener started on 0.0.0.0:4723
   info  - socket.io started

安装Java JRE 6

Install Java JRE 6

sudo apt-get install openjdk-6-jre

安装Android SDK

Install Android SDK:

下载 SDK 并将其解压到您的个人文件夹。

Download the SDK and extract it to your home folder.

推出的Andr​​oid SDK管理器:

Launch the Android SDK Manager:

~/path/to/android-sdk/tools/android

安装,您需要在新的窗口中包:

Install the packages that you'll need in the new window:

  • 安卓4.X
  • 在Android的支持库
  • 支持Android系统信息库
  • 在谷歌Play业务
  • 在工具的一切
  • 在附加功能下的一切

您还可以通过执行创建符号链接为Android SDK管理器:

You can also create a symlink for the Android SDK Manager by doing:

ln -s /path/to/android-sdk/tools/android /usr/bin/android

这篇关于如何设置Appium在Ubuntu为Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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