Skip to content

AlexZhukovich/AndroidUiTestingWorkshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages