Writing UI tests - Android

suggest change

Versions

The only version tag on this topic was 1.1.

Introduction

The focus of this document is the goals and the ways to write Android UI and integration tests. Espresso and UIAutomator are provided by Google, so the focus is those tools. Related tools include Appium and Spoon.

Syntax

Remarks

JUnit rules:

The MockWebServer example and ActivityTestRule are JUnit rules. You can write your own rules, and a rule runs for each test that uses it. See https://github.com/junit-team/junit4/wiki/rules

Appium

Parameters

Since parameters have some issues, they are placed here until that documentation bug is resolved:

Parameter Details
Class activityClass which activity to start
initialTouchMode should the activity be placed in touch mode on start: https://android-developers.blogspot.de/2008/12/touch-mode.html
launchActivity true if the Activity should be launched once per Test method. It will be launched before the first Before method, and terminated after the last After method.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents