项目作者: TrishaChetani

项目描述 :
[Mobile Automation] Android App Automation using Appium
高级语言:
项目地址: git://github.com/TrishaChetani/CoCoinAndroidAppChecks.git
创建时间: 2018-04-02T13:52:29Z
项目社区:https://github.com/TrishaChetani/CoCoinAndroidAppChecks

开源协议:

下载


AppiumDemo

Testing Mobile App using Appium

Objective

Intent of this project is to illustrate how Appium can be used to test mobile application Android

Tech stacks

  • Appium
  • JAVA
  • MAVEN as Build tool

    What app can perfrom

  1. Launch App
  2. Verify splash screen
  3. Swipe

2.0 Setup

Dev Setup

  • /Users/trishachetani/Library/Android/sdk
  • Android Setup via command line
    1. #!/bin/bash
    2. npm install -g appium
    3. path=$($HOME)
    4. echo $path
    5. cd $path
    6. mkdir appiumAndroidSetup
    7. cd appiumAndroidSetup
    8. echo "Downloading Android SDK ...."
    9. curl -O 'https://dl.google.com/android/repository/sdk-tools-darwin-3859397.zip'
    10. mkdir android
    11. mv sdk-tools-darwin-*.zip android/
    12. cd android
    13. unzip sdk-tools-darwin-*.zip
    14. echo "Accepting Android SDK licenses"
    15. yes Yes | tools/bin/sdkmanager --licenses
    16. echo "updating the Android sdk manager"
    17. yes Yes | tools/bin/sdkmanager --update
    18. echo "Downloading other tools ..."
    19. tools/bin/sdkmanager "platforms;android-25" "build-tools;25.0.2" "extras;google;m2repository" "extras;android;m2repository"
    20. rm sdk-tools-darwin-*.zip
    21. echo "Set below path as ANDROID_HOME"
    22. pwd
    23. `
  • references : [https://github.com/tech-tock-tech/AppiumSetup/blob/master/android_appium_setup.sh]
  • IOS setup via command line
    ````

    !/bin/bash

    echo “$1” | sudo -S chown -R whoami /usr/local
    npm install -g appium
    npm install -g authorize-ios
    echo “$1” | sudo -S authorize-ios
    echo “$1” | sudo -S xcode-select -s /Applications/Xcode.app/Contents/Developer
    npm install -g ios-deploy
    echo “$1” | gem install xcpretty
    brew install carthage
    brew install libimobiledevice —HEAD
    brew upgrade libimobiledevice —HEAD
    brew install ideviceinstaller
    brew upgrade ideviceinstaller
    brew install ios-webkit-debug-proxy
    brew upgrade ios-webkit-debug-proxy
    echo “$1” | sudo -S chmod +x /var/db/lockdown
    cd /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/
    mkdir -p Resources/WebDriverAgent.bundle
    ./Scripts/bootstrap.sh -d
    open WebDriverAgent.xcodeproj
  1. - Install appium via command line.
  2. ````npm install -g Appium
  • Check devices connected
    adb devices

RUN

  • Notes : Change the capabilities present in AndroidSetUp.java as per the your needs (For emulator/real devices)
  • How to run the app on emulator - Run the AppiumTest.java classFile
  • How to run your app on real device - Run the AppiumTest.java classfile

Video of Running Test

https://www.dropbox.com/s/0drwssyk6umkgde/WhatsApp%20Video%202018-04-12%20at%205.46.22%20PM.mp4?dl=0

Find Locators