Environment requirements:
Http://appium.io/on the statement:
IOS MacOSX 10.7 + XCode 4.5 + and Command Line Tools |
Https://github.com/appium/appium statement:
Npm 0.8 or greater Mac OS X 10.7 or higher, 10.8.4 recommended XCode> = 4.6.3 |
Check:
01. png
02. png
It is found that the two websites have different opinions. For security first, get a higher version.
No? I will search for one for you:
Xcode 5.1 official website download: http://adcdownload.apple.com/Developer_Tools/xcode_5.1/xcode_5.1.dmg Baidu online storage: http://pan.baidu.com/s/1c0xnrly#/url] Xcode5.0.2 official download: Http://adcdownload.apple.com/Developer_Tools/xcode_5.0.2/xcode_5.0.2.dmg Quick pass: Http://kuai.xunlei.com/d/qSU8CgLfEQBHiJRSe71 Command Line Tools (OS X Mavericks) for Xcode download: Http://kuai.xunlei.com/d/qSU8CgLmEQCriJRS2c6 Command Line Tools (OS X Mountain Lion) for Xcode download: Http://kuai.xunlei.com/d/qSU8CgLjEQB9iJRSa56 The above file Baidu Network Disk: [url] http://pan.baidu.com/s/1FypHd |
|
I have obtained an Xcode5.0.2 file. After installation, continue to install Command Line Tools:
03. png
04. png
05. png
Okay, the environment is basically ready. Let's take a look at other people's posts:
1. Install node. js 2. Install appium $ Npm install-g appium@0.12.3 Note that appium is compatible with OS. 3. Start appium $ Appium & Test on a real machine. Specify the UUID of the device during startup. $ Appium-U xxxxxxxxxxxxxxxxxxxxxxxxxx Appium startup parameters: Https://github.com/appium/appium/blob/master/docs/server-args.md 4. The app to be tested must be the Developer version. |
Let's look at the official website statement:
Npm install-g appium Npm install wd Appium & Node your-appium-test.js |
Wow, that's easy! It's not difficult to think about it.
Start:
06. png
You need to install a node first, but there is no brew on my machine, so you have to install brew first. brew is similar to apt-get In ubuntu, it is a management tool installed for you by using the software used for Internet search. Oh, this is a rough description and you can understand what I mean. ^ _ ^: first, I searched for a method:
Cd/usr/local Mkdir homebrew Cd homebrew Curl-LsSf http://github.com/mxcl/homebrew/tarball/master | tar xvz-C/usr/local -- strip 1 Cd bin ./Brew-v File brew Sudo./brew update More brew |
I did it myself. It is roughly this step and the installation was successful:
Admins-Mac: local admin $ cd bin Admins-Mac: bin admin $./brew-v Homebrew 0.9.5 Admins-Mac: bin admin $ file brew Brew: POSIX shell script text executable Cd Vi. bash_profile Export PATH =/usr/local/homebrew/bin: $ PATH |
Close and re-open terminal so that. bash_profile is executed to make the PATH environment variable take effect. Of course you can also use source./. bash_profile
During the installation process, the only thing you need to pay attention to is the permission. My practice is to directly change the/usr/local directory to admin directory before all steps, you don't have to use sudo for every installation.
Sudo chown-Rf admin: staff/usr/local
Now it's easy to install node. js. One line of command:
Brew install node
Then let's see if node is installed correctly. First, vi hello_world.js and enter the following content (assuming you will use an editor like vi and vim)
Var sys = require ('sys '), Http = require ('http '); Http. createServer (function (req, res ){ SetTimeout (function (){ Res. writeHead (200, {'content-type': 'text/plain '}); Res. write ('Hello World '); Res. end (); // res. close () as of the latest version; Replace with res. end (); },2000 ); }). Listen (8000 ); |
Run the following command:
Node hello_world.js
In this case, the browser returns "Hello World.
07. png
Finally, check:
Node-v
V0.10.15
Npm-v
1.4.6
All right. This is the case:
Npm install-g appium Npm install wd |
Run appium-doctor to check whether appium is completely OK:
Admins-Mac: bin admin $ pwd /Usr/local/bin Admins-Mac: bin admin $ ls-l Total 39064 Lrwxr-xr-x 1 admin staff 40 Apr 14 :33 appium-> ../lib/node_modules/appium/bin/appium. js Lrwxr-xr-x 1 admin staff 47 Apr 14 appium-doctor-> ../lib/node_modules/appium/bin/appium-doctor.js Lrwxr-xr-x 1 admin staff 47 Apr 14 authorize_ios-> ../lib/node_modules/appium/bin/authorize-ios.js -Rwxrwxr-x 1 admin staff 813 Apr 14 08:53 brew -Rwxr-xr-x 1 admin staff 19975968 Jul 26 2013 node Lrwxr-xr-x 1 admin staff 38 Jul 31 2013 npm-> ../lib/node_modules/npm/bin/npm-cli.js Lrwxr-xr-x 1 admin staff 33 Jul 31 2013 weinre-> ../lib/node_modules/weinre |
08. png
Because there is no android Environment on this mac, I have no plans to test the android program on this mac. Appium is OK.
Start appium (& indicates execution in the background without occupying the window ):
Admins-Mac: appium admin $ appium & [1] 1886 Admins-Mac: appium admin $ info: Welcome to Appium v0.18.1 (REV d242ebcfd92046a9741_ccc3a28f0e898595198) Info: Appium REST http interface listener started on 0.0.0.0: 4723 Info: socket. io started Info: Non-default server args: {merciful: true} |
Check the process and remove the background process:
Admins-Mac: appium admin $ ps-ef | grep appium 501 1886 1274 0 PM ttys000. 73 node/usr/local/bin/appium 501 1892 1274 0 PM ttys000. 00 grep appium Admins-Mac: appium admin $ kill 1886 |
Now, the environment is almost the same.