Transferred from: http://www.cnblogs.com/nzyjlr/p/4281081.html
Service environment: 1 installation Nodejs
Download Nodejs installation package (http://nodejs.org/download/) installation
Test installation succeeded: Run cmd, enter node-v
2 Installing the Android SKD
Install the Android SDK package, (http://developer.android.com/sdk/index.html), run the ' Android ' tool in dependent SDK. And make sure you have the LEVEL17 or above version API installed.
Set the Android_home system variable to your Android SDK path, and add tools and platform-tools two directories to the system's path path.
Variable: android_home
Value: D:\ANDROID-SDK
Setting: Path
Value:%android_home%\platform-tools;%android_home%\tools;
3 Installing Apache Ant
Installing Apache Ant (http://ant.apache.org/bindownload.cgi)
Unzip the folder and add the path to the environment variable.
Variable: ant_home
Value: D:\apache-ant-1.8.2
Setting: Path
Value:%ant_home%\bin
Test the ant environment to install successfully: Run cmd, enter ant, if not specified Build.xml will output:
Buildfile:build.xml does not exist!
Build failed
4 Installing the JDK
Installing the JDK
Download the Unzip folder and set the M2home and M2 environment variables to add the M2 environment variable to your system path variable.
Variable: java_home
Value: C:\Program Files (x86) \java\jdk1.7.0_01
Variable: classpath
Value:%java_home%\lib;
Setting: Path
Value:%java_home%\bin;%java_home%\jre\bin;
Test environment installed successfully: Run cmd, enter java-version If successful, Java information appears:
5 Installing Apache Maven
Installing Maven (HTTP://MAVEN.APACHE.ORG/DOWNLOAD.CGI)
Download the Unzip folder and set the M2home and M2 environment variables to add the M2 environment variable to your system path variable.
Variable: maven_home
Value: D:\apache-maven-3.1.1
Settings: Path:
Value:%maven_home%\bin
Test environment installed successfully: Run cmd, enter mvn-v If successful, the MAVEN message appears:
6 Installing Appium
Install Appium using NPM.
After the cmd using the command NPM install-g Appium under Appium (the entire process is slow, please wait patiently) after the installation succeeds, the following information appears in CMD input appium to indicate that the installation was successful:
At this point, the Appium installation process is complete.
Running environment 1 Installing the MAVEN plugin
To modify the MAVEN repository storage location:
Find the Settings.xml configuration file under Maven under Conf, mine is in D:\apache-maven-3.2.5\conf\settings.xml
The MAVEN repository defaults to the. M2 folder under the local user's Temp folder under Repository, mine is under the C:\Users\admcnm\.m2\repository directory,
Now let's modify to assign it to our own path, I'm now going to assign the repository to the D:\Repositories\Maven directory, just open the local repository that was logged off.
Then write the corresponding path value in it:
OK, first to experience maven, knock in CMD and enter to execute: MVN help:system
That's when Maven downloads a whole bunch of stuff from the remote repository, it's okay, let it download, and sooner or later it's going to be downloaded,
The next step is to install the Maven plugin in Eclipse,
There are two of the most common ways that Eclipse installs plug-ins:
1. One is the online installation, which seems to be the most used, that is: Help-and install New software, and then enter the HTTP address for installation, but there is a clear drawback: is slow! (Can be solved by FQ)
2. One is off-line installation, the way to install the link, this way can be better, can be plugged in and unplugged at any time, very convenient.
Eclipse MAVEN3 Installation:
1. Use the first way to install anyone, just enter the HTTP address: http://m2eclipse.sonatype.org/sites/m2e, tick the option, then wait for it to download and install, then restart Eclipse after completion.
2. Here I do not say the type of online installation, for two reasons: first, after installation is not good management; second, the download is too slow; what I'm going to say next is to use the link method to install the Maven3 plugin offline.
The website does not provide MAVEN plug-in offline installation package, general, you search on the Internet, lucky words should be able to find. I've compiled MAVEN's offline packages for people who need them to download,
Click here to download the link directly: http://115.com/file/dpk80gj0#eclipse-maven3-plugin.7z
Link installs Eclipse maven plugin offline
2. Unzip the eclipse-maven3-plugin.7z downloaded from the web to Eclipse\dropins
After Eclipse 3.6, you don't need to write a link. Just put the plugin you downloaded and put it under the eclipse\dropins.
For example: My maven plugin directory:
D:\eclipse\dropins\maven\
Then restart Eclipse
Check that the Maven plugin for Eclipse is installed successfully: Window--Preferences
To configure MAVEN:
1. Click the Add button to select the path value of your native MAVEN installation
2. Click the Browse button, select your Maven setting.xml profile, then click OK to complete the configuration of the Eclipse Maven plugin
Eclipse will help you automatically download the MAVEN plugin jar package and wait patiently
Run Tests
1. Connect the phone or launch the Android emulator.
2. Start Appium in cmd
3. Open a different cmd terminal window. Switch to the instance code path
4. Run MVN test for project construction you can see the value output in the Appium terminal window and start running the script on the emulator or phone.
5. Done.
Appium for Windows environment setup