zoukankan      html  css  js  c++  java
  • appium(2)-Setting up Appium

    Setting up Appium

    Running Appium on Windows

    Additional Setup for Android App Testing

    1. Download latest node and npm tools MSI (version >= 6.0). The npm and nodejs paths should be in your PATH environment variable.
    2. Download the latest Java JDK here (accept the license agreement first). Set 'JAVA_HOME’ to be your JDK path. The bin in that directory should be added to your PATH variable.
    3. Install the Android SDK. Set the ANDROID_HOME environment variable to be your Android SDK path and add the tools and platform-tools folders to your PATH variable.
    4. Install Apache Ant or use the one that comes with the Android Windows SDK in the eclipseplugins folder. Be sure to add the folder containing Ant to your PATH variable.//可省略,从源码安装appium时才需要
    5. Install Apache Maven and set the M2HOME and M2 environment variables. Set M2_HOME to the directory maven is installed in, and set M2 to the bin in that directory. Add the path you used for M2 to your PATH.//可省略
    6. To run tests on Windows, you will need to have the Android Emulator booted or an Android Device connected that is running an AVD with API Level 17 or greater. Then run Appium on the command line (via the appium command)
    7. Your test script should ensure that the platformVersion capability corresponds to the emulator or device version you are testing, and that the app capability is an absolute path to the .apk file of the Android app.

    Setup

    You can run an Appium server using node.js or using the application, see below.

    • Using Node.js

    1. npm install -g appium
    2. appium
    • Using the App
    1. Download the Appium
    2. Run it!

    Running Appium on Mac OS X

    Appium on OS X supports iOS and Android testing.

     

    System setup (iOS)

    • Appium requires Mac OS X 10.7 or greater. We recommend OS X 10.10.
    • Make sure you have Xcode and the iOS SDK(s) installed. Xcode version 7.1 is recommended as earlier versions of Xcode are limited in which versions of iOS they can test against. See the next section for more detail.
    • You need to authorize use of the iOS Simulator. See below.
    • If you’re on Xcode 7.x, Instruments Without Delay (IWD) does not work. You can enable IWD (which will significantly speed up your tests) using this method

    Authorizing iOS on the computer

    You need to authorize use of the iOS Simulator by running the authorize-ios binary made available through npm. Install the program by running

    npm install -g authorize-ios
    

    And the invoke the program using

    sudo authorize-ios
    

    If you are running Appium.app, you can authorize iOS through the GUI.

    You need to do this every time you install a new version of Xcode.

  • 相关阅读:
    java面试题之简单介绍一下集合框架
    java面试题之hashcode相等两个类一定相等吗?equals呢?相反呢?
    java面试题之什么是ThreadLocal?底层如何实现的?
    java面试题之stop()和suspend()方法为何不不推荐使⽤?
    设计模式—单例模式
    Java并发—同步容器和并发容器
    Java并发—并发工具类
    Java并发—原子类,java.util.concurrent.atomic包(转载)
    Java并发—java.util.concurrent.locks包
    Java并发—java.util.concurrent并发包概括(转载)
  • 原文地址:https://www.cnblogs.com/superbaby11/p/6054556.html
Copyright © 2011-2022 走看看