

* See the License for the specific language governing permissions and * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * distributed under the License is distributed on an "AS IS" BASIS, * Unless required by applicable law or agreed to in writing, software * You may obtain a copy of the License at * you may not use this file except in compliance with the License. * Licensed under the Apache License, Version 2.0 (the "License") * Copyright 2018, The Android Open Source Project Espresso comes as part of Android SDK a brief overview can be found here.Įspresso provides ways of interacting with the UI and assertions that can be used to perform checks in your tests. Tests use the Espresso testing library for UI-based tests. The project contains 2 tests, implemented both in Java and in Kotlin (thus, overall 4 tests although 2 "duplicated"). The code related to the previous activities can be found here. The Android application is quite simple: it contains two activities, where the main one as an input to change some text along with two buttons that will give the possibility to change the text in the current activity of in a new one.

Requirementsįor this tutorial, we'll use a basic Espresso example project provided by Google, with minor updates as tracked in this fork. Tests can be written either in Java or Kotlin. In this tutorial, we will "create" some UI tests for an Android application using Espresso testing library.
