On September 14th, 2017, we published revised versions of our Privacy Policy, Terms of Service and Website Use Policy and published a Cookie Policy. Your continued use of Lynda.com means you agree to these revised documents, so please take a few minutes to read and understand them.

Create tests with the Espresso Test Recorder

Keyboard Shortcuts

Espresso is an open source tool that lets you create and run unit tests for Android. Android Studio can record interactions with your app and then play them back, helping you find and fix UI-based bugs.

- [Instructor] Espresso is an open source library…that lets you create and run unit tests on Android apps.…Specifically, it tests the user interface…of an Android application.…And in Android Studio you can now record an Espresso test…and play it back.…I'll demonstrate this by creating a brand new…Android Studio project that I'll call EspressoTest.…I'll place the project…in my Android StudioProjects directory…and I'll select the Basic Activity template.…

I'll click Next and Finish and that creates the project.…Now I need something to test,…some change that happens in the application…as the result of an end user interaction.…In this project my MainActivity class…uses an XML layout file…and this XML layout file has a FloatingActionButton…that has an id of fab, standing for FloatingActionButton.…And the MainActivity class already has event handling code…that executes some code when I touch that button.…

Also, the content_main.xml file has a TextView component.…When the user clicks the button I'll change the text…that's being displayed by that TextView.…

Resume Transcript Auto-Scroll

Author

Updated

4/27/2017

Released

4/12/2016

Want to develop Android apps? You need Android Studio—the only IDE fully supported by Google for Android app development. This course is fully revised for 2016, covering all the essential features in the latest iteration of Android Studio (v2.0) and critical resources such as the Java Development Kit and Intel HAXM. David Gassner introduces the Android Studio interface, helps you set up your environment, and provides handy shortcuts for writing and debugging code. He also shows how to monitor CPU and memory usage; use templates, breakpoints, and watch expressions; and add version control by integrating Android Studio with GitHub.

Topics include:

Installing Android Studio on Mac and Windows

Creating Android Studio projects

Setting up the development environment, including HAXM and the new Android emulator

Importing existing code into Android Studio projects

Exploring the interface, including the editor and project windows

Managing project builds and dependencies

Creating new Java classes

Refactoring code

Using templates

Using breakpoints and watch expressions

Updating apps with Instant Run

Using Git for version control

Skill Level Beginner

3h 41m

Duration

298,773

Views

Show MoreShow Less

Q: This course was updated on 04/27/2017. What changed?

A: New videos were added that highlight the new features introduced in Android Studio 2.3. In addition, the following topic was updated: update apps with Instant Run.