Install and configure Appium on Mac

Source: Internet
Author: User

Installation Instructions:before looking at the introduction of the Internet, there are usually two ways to install Appium: one is to install the appium service using Nodejs's NPM command, and the second is to install the Appium GUI, which contains appium required Nodejs, Appium Server, Appium-inspector, and other components. The Mac version of the Appium GUI not only supports iOS and Android platforms, but also the recording feature. If you have the conditions, it is recommended to test on Mac OSX. (In fact, Mac Mini is not too expensive)1. Install the Java JDK and configure the Java environment variables1.1 Official:http://www.oracle.com/technetwork/cn/java/javase/downloads/jdk7-downloads-1880260.html Example: JDK-7U79-MACOSX-X64.DMG1.2 Configuration of Java environment variablesGet the Java_home for Java 1.7:
1.7

Append in the following file:

cybozumatomac-mini-4:/cybozu$ CD ~
VI . Bash_profile

For example:

1.7 ' Export PATH=${java_home}/bin: $PATH

2. Install the Android SDK2.1 Official version is Android Studio (requires Mac OSX 10.8.5 and above), as follows:Http://developer.android.com/sdk/index.html2.2 Running Android Studio, installing the SDK toolsSDK default path:/applications/android studio.app/sdk Note: If your iOS test needs to install Xcode2.3 Configuring environment variables, also added in. Bash_profileFor example:
Export android_home=/users/qa/test/adt-bundle-mac-x86_64-20140702/sdkexport PATH= $PATH: $ Android_home/platform-tools: $ANDROID _home/tools:export CLASSPATH=.: $JAVA _home/lib/dt.jar: $JAVA _home/ Lib/tools.jar

Create an Android virtual machine in the 2.4 Android SDK tool

1) Open the SDK Manager and install the SDK package.  It is recommended that you install the Intel Hardware Acceleration Execution Manager, with x86 mirroring, who knows who. 2) Open AVD Manager, create a new virtual machine, Recommendation 4.3.1 or above, i.e. above API18 (if no API18, install SDK package) 3) run the virtual machine and check if it is normal note: You can also create a new Android virtual machine using Eclipse. However, you need to install the ADT plugin, and you can start the virtual machine from the command line without opening the Android SDK, for example, Emulator-scale 0.5-netdelay none-netspeed full-avd API18 3. Installing the Appium service3.1 Installing NodejsAfter the nodejs:https://nodejs.org/download/release/latest/installation is complete, verify that the installation was successful: Node-v
cybozumatomac-mini-4:/cybozu$ node-vv5. 0.0

3.2 Installing the Appium service

Input in Terminal:
Install –g Appium

3.3 Starting the Appium service

Terminal input: Appium (appium&, that is, background running)3.4 Check if the appium environment is normalTerminal input: Appium-doctor, the relevant configuration of iOS and Android will be checked separately, if "all Checks were successful" is displayed, then the configuration is successful note: The Android check will be android_home and Java_ Home to check, if not passed, modify environment variables 4. Installing the Appium GUI4.1 Download Appium installation package: https://bitbucket.org/appium/appium.app/downloads/For example: APPIUM-1.4.13.DMG4.2 Start and verify that the Appium is configured successfully, and the effect is the same as step 2.3 4.3 Configuring Android apk information to be tested 5. Dependent files5.1 Selenium Webdriver Library, select the programming language you are using: http://docs.seleniumhq.org/download/5.2 Appium Client Libraries, Select the programming language you are using : http://appium.io/downloads.html 6. Run Sample codeSamle code Download: https://github.com/appium/sample-code/tree/master/sample-code/examples6.1 Start creating a good Android virtual machine, such as step 2.4 6.2 Open the Appium GUI, configure the information, click Launch to run. After running successfully, you can view the app's page information through inspector, and you can do the script recording. Of course, there is no need to open the GUI, the terminal in the direct input appium can start the service, which facilitates the execution of scripts and remote access operations. 6.3 start Android Studio or Eclipse, create a new project, associate a dependent jar file6.4 Running Sample code

Install and configure Appium on Mac

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.