Giter Site home page Giter Site logo

automationpanda / applitools-appium-android-webinar Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 1.0 8.95 MB

An example project showing how to use Applitools Native Mobile Grid with Appium for Android apps

License: MIT License

Java 100.00%
android appium applitools applitools-eyes mobile-testing gradle java

applitools-appium-android-webinar's Introduction

applitools-appium-android-webinar

This repository contains an example Java project showing how to use Applitools Native Mobile Grid with Appium for Android apps. It is my first Appium test automation project!

Influences

I learned how to start testing with Appium from Gaurav Singh's guides and example code below:

Workbench Setup

Setting up an Appium project is no small task. You'll need to install and configure the following:

Follow Gaurav's guides listed above for instructions on setting up everything.

Warning: Setup might take several hours due to large download sizes.

Instrumented App Builds

The Android mobile app under test is the Applifashion demo app. Three versions of the app are located under src/test/resources/instrumented-apk:

  1. A main branch that represents the starting point for testing.
  2. A dev branch that represents changes made to the app (with bugs).
  3. A prod branch that represents the changes with bug fixes ready for deployment.

The .apk files for each version have already been instrumented for testing with Applitools Native Mobile Grid.

Test Inputs

The tests require the following environment variables as inputs:

  • APP_BRANCH
    • The branch of the app to target from src/test/resources/instrumented-apk
    • Must be main, dev, or prod
    • Defaults to main
  • APPIUM_URL
    • The URL for the Appium driver
    • Defaults to http://127.0.0.1:4723/wd/hub
  • APPIUM_DEVICE_NAME
    • The name of the local Android device to target
    • Defaults to Pixel 3a API 32
  • APPIUM_PLATFORM_VERSION
    • The Android platform version for the target device
    • Defaults to 12
  • APPLITOOLS_API_KEY
    • The Applitools API key for the user's account
    • Register for a free Applitools account here
    • Required

Test Execution

Before launching tests, make sure:

  • Appium is running
  • The target Android device is running
  • The environment variables for test inputs are set

The test class is ApplifashionTest. It is located at src/test/java/com/automationpanda/ApplifashionTest.java.

The tests can be run from within an IDE or from the command line. To run from the command line, run the following Gradle directive:

:test --tests "com.automationpanda.ApplifashionTest"

The tests will run once locally, and then Applitools will render snapshots against multiple Android devices in the Native Mobile Grid.

applitools-appium-android-webinar's People

Contributors

automationpanda avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

kulsumsiddique

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.