appium Environment on Mac

After half a year after combat, and finally have time to sum up. The first lecture mainly refers to the build environment

Software Environment:

1. Install Homebrew

   brew a software management tool is the mac, installation of various software packages which can enter commands via the terminal

   Input terminal: / usr / bin / ruby ​​-e "$ (curl -fsSL    

   https://raw.githubusercontent.com/Homebrew/install/master/install)"

   If you previously installed need to update to the latest version: brew update && brew upgrade && brew clean

2. Installation libimobiledevice and ideviceinstaller (real machine necessary connection, and pointing device interface system log based on the tool)

   brew install --HEAD libimobiledevice  和brew install --HEAD brew install --HEAD ideviceinstaller(注意

    A mounting one, not simultaneously) 

3. Install node (object mounted NPM)

   brew install node or https://nodejs.org/en/download/ download .pkg file download

4. Install cnpm (for some reason, the direct use npm download and install the network will be some reason)

   Elevation install - g cnpm - registry = https: //registry.npm.taobao.org

5. Installation ios-deploy (ios app installation tool, connected to the real machine)

   cnpm install -g ios-deploy (ios-deploy -c Check the device name)

6. Install xcpretty

   gem install xcpretty

7. Install carthage (dependencies management tool)

   brew install carthage

8. Installation jdk

9. Installation appium

   Command version:

   npm install -g [email protected], installation

   No directory permissions prompt installation fails, use the command sudo npm install -g  [email protected] -beta -unsafe-Perm to true =

   UI version:

   Official website to download

10.appium-doctor download (check appium environment)

    npm install -g appium-doctor

Environment configuration: (jdk, maven, testng, android sdk, etc.)

In edit vi ~ / .bash_profile file in the terminal

It reads as follows:

export DYLD_LIBRARY_PATH="/usr/local/mysql/lib/"
export PATH=${PATH}:/usr/local/mysql/bin
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home
export M2_HOME=/Users/username/Downloads/apache-maven-3.5.3
export PATH=$PATH:$M2_HOME/bin
export TOMCAT_HOME=/Users/username/Downloads/apache-tomcat-7.0.88/bin
export PATH=$PATH:$TOMCAT_HOME

export TESTNG_HOME=/Library/testNG
export CLASSPATH=$TESTNG_HOME/testng-6.8.7.jar
export CLASSPATH=$CLASSPATH:$TESTNG_HOME/jcommander-1.27.jar
# added by Anaconda2 5.1.0 installer
export PATH="/Users/username/anaconda2/bin:$PATH"
export BIU_PATH=/Library/ibiu
export PATH=$PATH:$BIU_PATH

And then save, and then save the input terminal at a source ~ / .bash_profile give effect

WDA arranged (installed WebDriverAgent)

1. Go to WebDriverAgent folder appium installation directory, specific reference path own path, can be found by the find command

  /Applications/Appium.app/Contents/Resources/app CD
  / node_modules / Appiae / node_modules / Appia-xcuitest-driver / WebDriverAgent

2. Install appium-xcuitest-driver-dependent, executed in WebDriverAgent directory: mkdir -p Resources / WebDriverAgent.bundle sh ./Scripts/bootstrap.sh (may fails because of network problems)

3. Compile WebDriverAgent.xcodeproj

   Xcode open files in the current directory WebDriverAgent.xcodeproj

 

    

4. Compile and WebDriverAgentLib WebDriverAgentRunner (modified Bundle Identifier, check the connection sign developer account  

   number). Compile error should not be dependent on installed

5. Establish service WebDriverAgent (both MAC and mobile phones in the same network segment, and can be connected to external networks)

   xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination    

   'id=00008020-000C2DD10268002E' test

   Run the app Finally, there will be more of a WebDriverAgentRunner



       

 

Guess you like

Origin www.cnblogs.com/fanjq/p/11742354.html