All Projects → lkorth → Device Automator

lkorth / Device Automator

Licence: mit
An easy to use, Espresso like, syntax on top of the Android UI Automator testing framework

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Device Automator

Kakao
Nice and simple DSL for Espresso in Kotlin
Stars: ✭ 1,109 (+1660.32%)
Mutual labels:  espresso, ui-testing
Green Coffee
Android library that allows you to run your acceptance tests written in Gherkin in your Android instrumentation tests.
Stars: ✭ 219 (+247.62%)
Mutual labels:  espresso, ui-testing
Compose
Nice and simple DSL for Espresso Compose UI testing in Kotlin
Stars: ✭ 56 (-11.11%)
Mutual labels:  espresso, ui-testing
Katasuperheroeskotlin
Super Heroes Kata for Android Developers in Kotlin. The main goal is to practice UI Testing.
Stars: ✭ 77 (+22.22%)
Mutual labels:  espresso, ui-testing
espresso-robot-pattern-sample
Espresso Robot Pattern Sample with Spoon Integration
Stars: ✭ 37 (-41.27%)
Mutual labels:  espresso, ui-testing
Youku Sdk Tool Woodpecker
In-app-debug tool for iOS
Stars: ✭ 600 (+852.38%)
Mutual labels:  ui-testing
Espressopp
Main ESPResSo++ repository
Stars: ✭ 33 (-47.62%)
Mutual labels:  espresso
React Chaos
Chaos Engineering for your React apps.
Stars: ✭ 578 (+817.46%)
Mutual labels:  ui-testing
Yourview
YourView is a desktop App in MacOS based on Apple SceneKit. You may use it to view iOS App's view hierarchy 3D.
Stars: ✭ 528 (+738.1%)
Mutual labels:  ui-testing
Scrutiny
Randomly test state machines (such as your UI) by randomly navigating through transitions
Stars: ✭ 46 (-26.98%)
Mutual labels:  ui-testing
Selenium Toys
Selenium Toys
Stars: ✭ 14 (-77.78%)
Mutual labels:  ui-testing
Katasuperheroesandroid
Super Heroes Kata for Android Developers. The main goal is to practice UI Testing.
Stars: ✭ 680 (+979.37%)
Mutual labels:  espresso
Kuiks
Kotlin Multiplatform based testing framework for Android and iOS
Stars: ✭ 38 (-39.68%)
Mutual labels:  espresso
Kotlin Android Starter
[Kotlin Android] Kotlin Android starter based MVP/Dagger2/RxJava2/Robolectric/Espresso/Mockito. It provides a generator to fast create a Kotlin Android project.
Stars: ✭ 589 (+834.92%)
Mutual labels:  espresso
Android Testing Runtime Permissions
An example of using Espresso and UiAutomator to write UI tests that interact with Android M permission dialogs.
Stars: ✭ 46 (-26.98%)
Mutual labels:  espresso
Archapp
Simple Android app to show how to design a multi-modules MVVM Android app (fully tested)
Stars: ✭ 551 (+774.6%)
Mutual labels:  espresso
Androidtestingtutorial
Getting started with Espresso Unit Testing
Stars: ✭ 10 (-84.13%)
Mutual labels:  espresso
Mvvm Kotlin Android Architecture
MVVM + Kotlin + Retrofit2 + Hilt + Coroutines + Kotlin Flow + mockK + Espresso + Junit5
Stars: ✭ 1,014 (+1509.52%)
Mutual labels:  espresso
Nightwatch Boilerplate
boilerplate for nightwatch.js with selenium
Stars: ✭ 16 (-74.6%)
Mutual labels:  ui-testing
Ui Testing Best Practices
The largest UI testing best practices list (last update: January 2021)
Stars: ✭ 783 (+1142.86%)
Mutual labels:  ui-testing

device-automator

Build Status

Device Automator is an Android library built on top of the UI Automator testing framework. Device Automator provides an easy to use syntax for writing UI Automator tests that interact across apps and the device itself. The Device Automator API very closely resembles the Espresso API and similarly encourages test authors to think in terms of what a user might do while interacting with the application - locating UI elements and interacting with them.

Setup

Download device-automator

Add the dependency in your build.gradle file:

dependencies {
  androidTestCompile 'com.lukekorth:device-automator:1.1.0'
}

To use the latest build from the master branch use:

dependencies {
  androidTestCompile 'com.lukekorth:device-automator:1.1.0-SNAPSHOT'
}

Set the instrumentation runner

Add the following line to your build.gradle file in android.defaultConfig:

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Writing Tests

It's recommended that you start every test from your device's home screen. To do that, run the following before each test:

onDevice().onHomeScreen();

To launch an app, call:

onDevice().launchApp("com.myapp.package");

To click on a view:

onDevice(withText("My Button")).perform(click());

To type text:

onDevice(withText("Enter text here")).perform(setText("foobar"));

To make assertions after interacting:

onDevice(withContentDescription("message field")).check(text(containsString("my message")));
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].