1. 程式人生 > >Ubuntu下Appium環境搭建。

Ubuntu下Appium環境搭建。

閒著沒事,就搭建了一下appium的環境,玩了一下,下面是具體過程,有需要的朋友可以參考。

其實流程官網上都有,這裡就把它摘出來,使其連貫。

下載原始碼:

git clone git://github.com/appium/appium

安裝Node.js

Setup with Ubuntu:

curl --silent --location https://deb.nodesource.com/setup_0.12 | sudo bash -

Then install with Ubuntu:

sudo apt-get install --yes nodejs

在官網的Get Started:Requirements中,有這樣一句話--Make sure you have not installed Node or Appium with sudo
,otherwise you'll run into problems。

可是不用sudo安裝的時候很多系統資料夾都沒法訪問,那就切換到root使用者下。

(個人猜想,這裡可能是用到了一些root使用者下的環境變數,要不然這兩者之間也沒什麼大的差別,用sudo雖然許可權有了,但還是用的原先的環境變數)。

Android Setup

To get started, you’ll need to install node.js (v0.10 or greater). Justfollow the instructions for your flavor of linux.

Once you’ve got node.js installed, install the Android SDK.You will need to run the ‘android’ tool (included in the SDK, under the ‘tools’ directory).

既然是拿來測試APP,那自然是需要安裝SDK的,現在google被牆,官網是下不了,給大家一個地址:http://www.androiddevtools.cn/

關於SDK環境變數之類的設定這裡就不多說了。

Run the ‘android’ tool and use it to install an API Level 17 or greater.

這裡限定了你的Android API版本,必須是API Level 17以上。

(If you want to run Appium from source, you will also need Apache Ant to build the bootstrap jar that Appium uses for running against Android simulators/devices.)

下載好Ant後,我們需要去SetUp(以下摘至Apache Ant Manual)

Before you can run Ant there is some additional set up youwill need to do unless you are installing the RPMversion from jpackage.org:

    Add the bin directory to your path.
    Set the ANT_HOME environment variable to thedirectory where you installed Ant. On some operating systems, Ant'sstartup scripts can guess ANT_HOME (Unix dialects andWindows NT/2000), but it is better to not rely on this behavior.
    Optionally, set the JAVA_HOME environment variable(see the Advanced section below).This should be set to the directory where your JDK is installed.

Operating System-specific instructions for doing this from the commandline are in the Windows, Linux/Unix (bash),and Linux/Unix (csh) sections. Note that using this method,the settings will only be valid for the command line session you run them in.

Note: Do not install Ant's ant.jar file into the lib/extdirectory of the JDK/JRE. Ant is an application, whilst the extensiondirectory is intended for JDK extensions. In particular there are securityrestrictions on the classes which may be loaded by an extension.

說的很清楚,把下載好的bin檔案放到你自己想要放的路徑,新增環境變數ANT_HOME(這裡說下最好把這些環境變數放到系統配置檔案中,比如/etc/profile,這樣所有使用者都可以使用)

Assume Ant is installed in /usr/local/ant. The following sets upthe environment:

export ANT_HOME=/usr/local/ant
export JAVA_HOME=/usr/local/jdk1.7.0_51
export PATH=${PATH}:${ANT_HOME}/bin

Finally, set $ANDROID_HOME to be your Android SDK path. If you unzipped theAndroid SDK to /usr/local/adt/, for example, you should add this to yourshell startup:

export ANDROID_HOME=“/usr/local/adt/sdk”

Now you’re set up to run Appium! If you’re running Appium from source, run./reset.sh --android from your Appium checkout to install all thedependencies.

最後配置一下ANDROID_HOME環境變數,指向你的Android SDK。

最後去你的原始碼目錄下,執行./reset.sh --android。到此為止,你的Appium Server就可以啟動了。

Appium的設計理念是client/server這種框架形式,那麼server好了,是不是得準備client了。

這時就看到Appium的強大之處,竟然支援那麼多language,可以隨意選擇自己擅長的。

git clone [email protected]/appium/python-client.git
cd python-client
python setup.py install
開源的東西真好,直接下原始碼,然後看看人家是怎麼設計的,提高自己。

相關推薦

UbuntuAppium環境搭建

閒著沒事,就搭建了一下appium的環境,玩了一下,下面是具體過程,有需要的朋友可以參考。 其實流程官網上都有,這裡就把它摘出來,使其連貫。 下載原始碼: git clone git://github.com/appium/appium 安裝Node.js Setup

ubuntuspring環境搭建

ext targe out 插件 fontsize article ase tex get 一.安裝JDK 下載官網:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-21331

Ubuntucaffe環境搭建的過程及出現的問題

目錄 基於ubuntu14.04安裝CPU版的caffe 1. 切換root許可權 2. 安裝開發依賴的包 3. 安裝加速CPU計算的數學依賴庫 4. 安裝ubuntu14.04特定的依賴 5. 安裝OpenCV開源庫

MacAppium環境搭建

我的系統是MacOs 10.12.2使用terminal命令列的方式安裝: 1.mac自帶了Ruby,網上很多給的安裝命令下載的版本較低,使用下列命令,可以安裝最新的brew,我的安裝成功後,Mc:~ cong.wang$ brew -v Homebrew 1.1.9:/

ubuntuZooKeeper環境搭建(進行中)

1.ubuntu環境 通過官網下載了對應的iso,用光碟或者u盤安裝。 配置網路服務後安裝eclipse失敗。原因是版本連線的路徑已經陳舊了,需要更新或升級軟體源庫,確保系統中的所有軟體都更新到最新版本。 執行sudo apt-get update進行更新。 結果提示出錯,

ubuntujenkins環境搭建

摘要 之前搭建的jenkins伺服器一直都是用自己本機進行的實驗,缺點就很明顯了,佔用自己計算機的資源 而且所有的東西都在自己計算機上執行,也不算真正的自動化的感覺,所以剛好把辦公室閒置的一臺伺服器拿來搭了個jenkins的伺服器。由於考慮到後續還需要在上

ubuntuNDK環境搭建

1、安裝make build工具 執行以下命令: sudo apt-get install build-essential 2、下載NDK 官網下載頁:http://developer.android.com/tools/sdk/ndk/index.html 下載下來後,解

ubuntu使用Eclipse搭建C++開發環境

ubuntu下使用Eclipse下搭建開發環境基本上網上教程一大堆,但是複雜度太大,因為很多教程都是從JDK開始安裝一直到最後,而且很多都是從別的linux發行版上弄來的方法,各種編譯直接嚇死人有木有,其實ubuntu的方便之處很大程度上在於atp的使用,抹殺了atp的ubuntu那就太雞肋了。

UbuntuSublime Text3搭建python3.5程式設計環境小記錄

安裝環境: Ubuntu16 x64 sublime text 3 使用系統預裝的python3.5 TIPs: 1.在Ubuntu命令列終端裡輸入“which python3.5”來檢視python3.5的安裝路徑。 在我的Ubuntu裡,python預設是2.7,同時

Ubuntu環境golang環境搭建

ref 圖片 crack mirror mage bubuko 網址 安裝包 golang安裝 一、更新國內鏡像源   1. 網址:https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/      2. 備份Ubuntu默認源地

mac 自動化測試appium環境搭建,以及應用

一、去appium官網下載安裝包並安裝,我的是appium-1.5.3 二、開啟控制檯輸入ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" &l

ubuntu使用Eclipse搭建Hadoop開發環境

http://www.cnblogs.com/linjiqin/archive/2013/06/21/3147902.html http://m.blog.csdn.net/blog/designpc/22757379

UbuntuApache+SVN搭建SVN服務多項目管理

svn apache2 一、系統環境[email protected]/* */:~# cat /etc/issueUbuntu 16.04.2 LTS \n \l二、創建svn組和用戶[email protected]/* */:~# addgroup svnserAddin

cocos2dx 3.0 windows8開發環境搭建搭建 不須要cygwin

進行 文件夾 jdk 搭建 pop 官網下載 trac develop 嘗試 已經接觸cocos2dx有一段時間,但一直也僅僅是看看Demo,沒有真正的去寫代碼。由於本人僅僅是java的coder。還是半路出家的coder,編程基礎太淺。對於c++、lu

Appium環境搭建

topic 環境搭建 art html .cn detail view csdn appium http://www.cnblogs.com/ydnice/p/5787800.html http://blog.csdn.net/keeng2008/article/d

Appium環境搭建(MAC版)

cnblogs -1 tool releases 需要 ads ins source 程序 一、環境搭建 (1)安裝node.js brew install node (2)安裝Xcode 測試iOS App需要。打開Finder,在Applications文件夾下,看是否

Appium 環境搭建 - macOS

file 文件 pan fss con 環境 ont rec 自己 export 本文沒有安裝 Appium Desktop,Appium Server 直接在命令行中進行即可。 Homebrew,macOS 包管理器: ruby -e "$(curl -fsSL htt

CentOS Hadoop 環境搭建--Hadoop

mkdir left res 修改文件 wordcount cat 創建 work tar ---恢復內容開始--- ①解壓Hadoop到自定目錄下面(這裏解壓到/opt/hadoop目錄下)   tar -zxvf hadoop-2.5.0.tar.gz -C /opt/

Appium環境搭建(Windows版)

變量 mas absolute element edit windows 系統 before andro 註:appium安裝到C盤,node.js安裝到C盤 一、安裝node.js 1、到官網下載node.js:https://nodejs.org/en/download

Appium python自動化測試系列之appium環境搭建(二)

ftp 自動化 手動 文件 搭建環境 做到 安裝python reg 成員 ?2.1 基礎環境搭建 當我們學習新的一項技術開始基本都是從環境搭建開始,本書除了第一章節也是的,如果你連最基礎的環境都沒有那麽我們也沒必要去說太多,大概介紹一下: 1、因為appium是支持and