Giter Site home page Giter Site logo

androiduitestingworkshop's Introduction

Workshop: Android UI Testing

During this workshop, we will cover the following topics:

  • Introduction to Android testing
  • How to interact with Activity, Fragment, Jetpack Compose in Android UI tests
  • What is "End-to-End(E2E) testing"?
  • What is "Functional testing"?
  • What is "Screenshot testing"?
  • How to apply E2E, functional and screenshot testing techniques to the testing Android apps?
  • Which frameworks we can use for testing Android apps?

The "mood-tracker-android" is an Android application that allows you to collect information about the emotional state during the day.

The "mood-tracker-api" is an API that allows you to store information about users. This project created for demo in this project as it doesn’t save emotional state data in the remote database.

Requirements

To configure and run an "Android app" and "API" projects, I recommend using the following IDEs:

How to set up the projects

The "mood-tracker-api" configuration

This project requires a few environment variables which can be added in the IntelliJ IDEA:

  • SECRET_KEY
  • SESSION_ENCRYPT_KEY (HEX string)
  • SESSION_AUTH_KEY (HEX string)

Android emulator

I recommend to an emulator with the following parameters:

  • Pixel 5
  • Android 12 Google APIs (API 31)

Test case execution

The "Shot" library

To execute screenshot tests which uses the "shot" library, we can use the following commands:

  • ./gradlew :app:debugExecuteScreenshotTests -Pandroid.testInstrumentationRunnerArguments.annotation=com.alexzh.moodtracker.annotation.AppScreenshotTest - execute all screenshot tests
  • ./gradlew :app:debugExecuteScreenshotTests -Precord -Pandroid.testInstrumentationRunnerArguments.annotation=com.alexzh.moodtracker.annotation.AppScreenshotTest - execute all screenshot and update screenshots

The "Maestro" framework

The "Maestro" framework includes the "Maestro Studio", you can run it by executing the maestro studio command.

To execute test "Maestro" test cases, you can use the maestro test --format junit e2e-flow-test command.

Helpful links

androiduitestingworkshop's People

Contributors

alexzhukovich avatar

Stargazers

Hitham Elbasheir avatar Ali Azaz Alam avatar

Watchers

James Cloos avatar  avatar

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.