Skip to content

Mobile Automation Framework - Appium, PyTest, Python

Notifications You must be signed in to change notification settings

elixirautomation/appium-pytest

Repository files navigation

[RAFT] Reusable Automation Framework For Testing

Initial Setup:

  • Install and configure Python3

  • Setup your IDE (Preferably Pycharm Community Edition)

  • Setup Appium Server with Desktop Client Appium-Desktop

  • Setup Android Studio and Emulator

  • Import cloned repository as project

  • Install allure plugin for reporting

    • For Windows:

      • Run this command in powershell
          iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
      • After installing scoop run this command
          scoop install allure
    • For Mac:

      • Run this command on terminal to install homebrew
          /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
      • After installing homebrew run this command
          brew install allure
    • For Linux:

      • Run following commands to install the allure on linux
          sudo apt-add-repository ppa:qameta/allure
          sudo apt-get update
          sudo apt-get install allure
  • Install all required packages using this command

    pip install -r requirements.txt
  • Add your test case under TestScripts folder

  • Add your test data to <env_data>.json file

Example:

  • Open pycharm terminal (Alt+F12) and run following command to invoke the android app
    • Test Execution (Local Setup)
      py.cleanup -p && py.test --platform=android --alluredir allure-results/
      py.cleanup -p && py.test --platform=ios --alluredir allure-results/
    • Test Execution (Cloud Grids)
      py.cleanup -p && py.test --platform=bs_android --alluredir allure-results/
      py.cleanup -p && py.test --platform=bs_ios --alluredir allure-results/
  • Run following command to see the allure report
    allure serve allure-results

About

Mobile Automation Framework - Appium, PyTest, Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages