1.0.0 • Published 5 months ago

hijra-mobile-app-automation v1.0.0

Weekly downloads
-
License
-
Repository
-
Last release
5 months ago

Hijra Mobile Automation

This project is Mobile automation hijra with wdio.

Confluence Content

Prerequisites

  • Node v23.++
  • Yarn v1.22++
    • Install yarn using npm : npm install -g yarn@1.22
  • Android SDK v35++
  • SDK Platform Tools
  • Emulator Android Pixel 6++
    • Upgrade ram emulator to 3GB for smooth run.
  • Android API Level 33
  • JDK 11 ++
  • Install ODBC
  • .env files

How to install & run

  1. Open Console
  2. Go to folder .automation
  3. Run yarn install or yarn install --frozen-lockfile

How setup android test

  1. Open file .automation/config/android-capabilities.ts
  2. Edit appium:avd
    • You can get name avd with run in console emulator -list-avds
  3. Turn On VPN Dev staging
  4. Start emulator like you set in poin 2
  5. Run Test with tag ,
    yarn android.app.test ${tag}
    or Run Test all scenario,
    yarn android.app
  6. After running you can see all log wdio and appium in folder .automation/wdio-logs
  7. Videos folder can check .automation/videos

How can see report

  • Wdio will generate report if you run automation until finish(No Cancel).
  • You can get this report in this path : .automation/.tmp/report

Troubleshoot

  • How to enable print log in console?
    • Add variable SHOWLOG=true in .env files.
  • How do I get the tag I want to run?
    • You can open the BDD scenarios located in .automation/features/scenarios and check each scenario that you want to run.
  • Why is there a "no connection" error on the emulator when running tests?

    • Try checking the emulator's Wi-Fi. Is there an exclamation mark on the Wi-Fi icon?
      1. If yes, try the following steps:
      2. Turn off the staging VPN.
      3. Turn off the emulator.
      4. Start the emulator.
      5. Turn on the Wi-Fi.
    • If not, check if the mobile backend server is down or restarting.
  • Where is the video recording of the test results?

    • You can find the video recording in the wdio-logs folder.
  • On appium log, always show error invalid session.

    • Try to kill or uninstall appium.uiautomator with this command

      adb uninstall io.appium.settings
      adb uninstall io.appium.uiautomator2.server
      adb uninstall io.appium.uiautomator2.server.test
    • Now try to run script again