ryoyakawai / uitest_sample_android

espresso_com_example_myapplication

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

uitest_sample_android CircleCI Quality Gate Status

What's this?

This is an ui test code sample of Espresso. The app is really a basic/template sample that is of Android Studio generated by selecting "Basic Acticity".

Where is the Test code?

UI Test(Instrumented Test)

The code is under app/src/androidTest/java/com/example/uitestsample

Unit Test

The code is under app/src/test/java/com/example/uitestsample

How to run the Test?

Run Test on GUI

To run the test, Android Studio must be installed, and also more than one virtual devices must be run in your computer. Then open UI Test code on Android Studio, then click the 'Play Button' locaeted next to line number.

In short:

  1. Clone this repository
  2. Install Android Studio
  3. Setup Virtual Device and Run it
  4. Open the UI Test code
  5. Click 'Play Button'

Run Test on CLI

At No.3 in the list above, CLI can be the alternatice way to run the Test.

Instrumented Test

$ ./gradlew connectedAndroidTest

Unit Test

$ ./gradlew test

However, this way does not always easy for all of developers. So, to get more information about to run on CLI in detail please refer to this page depending on your interest. https://developer.android.com/studio/test/command-line

Run both Instrumented Test and Unit test, and get report

./gradlew jacocoDebugTestReport

Report will be stored in ./app/build/reports/ directory.

Lisence

Apache License Version 2.0

About

espresso_com_example_myapplication

License:Apache License 2.0


Languages

Language:Kotlin 100.0%