This website uses cookies to ensure you get the best experience on our website. Learn more

UI testing with Espresso - Android Testing Patterns #2

x

UI testing with Espresso - Android Testing Patterns #2

Espresso is a testing framework that makes writing UI tests for Android applications easy. Learn the basic structure of an Espresso test and how to run and execute instrumentation tests in Android Studio. Learn more about Espresso basics at

Codelabs - code-labs.io/codelabs/android-testing
Testing samples - github.com/googlesamples/android-testing
Android Testing Blueprint - github.com/googlesamples/android-testing-templates
Android Testing Support Library - google.github.io/android-testing-support-library

#testing #tools

Subscribe to the Android Developers channel at

Android Testing - Getting Started with Espresso 2.0

In this video we cover how to set up your Android Studio environment to use Espresso 2.0. We talk about matchers, assertions and how to use them. We also demonstrate a simple TDD (Test Driven Development Method) implementation for the first test. At the end of this screencast you should be able to set up your Android Application with the Espresso Testing framework.

For more videos see or this YouTube channel:
x

Android Testing Support - Android Testing Patterns #1

In this introductory episode of Android Testing Patterns, Wojtek Kalicinski introduces the two main types of tests that you will write for your app. Running Unit Tests and Instrumented Tests is both supported by Android Studio and we offer some great tools for testing in the Android Testing Support Library. One of them is Espresso, a UI testing framework that we'll concentrate on in Season 1 of ATP.

Learn more at
Codelabs - code-labs.io/codelabs/android-testing
Testing samples - github.com/googlesamples/android-testing
Android Testing Blueprint - github.com/googlesamples/android-testing-templates
Android Testing Support Library - google.github.io/android-testing-support-library

#testing

Subscribe to the Android Developers channel at

AdapterViews and Espresso - Android Testing Patterns #3

Testing lists, grids and spinners with Espresso needs a different approach than the standard View matching with onView(). Learn how to use onData() to look for data in the Adapters backing your AdapterViews to easily bring the required row on screen.

Further reading:

AdapterViews and Espresso on Medium:
Espresso onData documentation:
Espresso DataAdapter Sample:

Watch more episodes of Android Testing Patterns here:

#testing

Subscribe to the Android Developers channel at
x

Testing on Android Explained (Unit, Instrumentation, UI)

Register to take the course:


In this video I explain the three different types of tests:
1) Unit Tests (local)
2) Instrumentation Tests
3) UI Tests

I explain the differences between these tests and the different directories responsible for hosting the test classes.

I also talk about some of the common third party libraries you'll use when writing these tests. Libraries like:
1) JUnit
2) Mockito
3) Expresso

Get notified when the course is published:

Create UI tests with Espresso Test Recorder

Read more about Espresso:
IdlingResource:
Download Android Studio 2.3 here:

Learn how to use the Espresso Test Recorder in Android Studio 2.3 to add UI test to your app. Whether you’re just learning the Espresso framework or you want to create a base for your UI test suite quickly, the Test Recorder is a great tool that will make the job faster and easier by creating most of the code for you!

Additional Resources:
Read more about Espresso:
IdlingResource:
Download Android Studio 2.3 here:

#tools #testing
x

Android Unit Testing, Mockito, and Modular Code

Let me show you want building an Android App is like!
WARNING: I sometimes swear (in multiple languages) and make off-color jokes. If that makes you uncomfortable, turn the stream off :).

IMPORTANT: Feel free to ask me questions about what I'm doing, or the project I'm working on in general (E.g. What does RxJava do in the App?). I'm an Intermediate Dev so don't expect an answer to everything :).

ToDo List for Today:
- Demonstrate the current state of Dagger 2 in my OS app Postrainer,

Repo for current Project:


If you appreciate what I'm doing here, check out these options to support me over Social Media:
G+:
Facebook:
Twitter:
Patreon:

S01E02 || Testing in Android || Setup espresso dependencies || Ajit Singh

In this video we will setup our project with espresso dependencies to start writing tests.

Code:

Instructions:


Android
Android Instrumentation Testing
Instrumentation Testing
Google Espresso
Espresso
Espresso Testing
TDD in Android
Testing in android
Testing
Android Testing
Testing UI in Android
UI Testing
Automation
TDD
Test Driven Development
Live Coding
How to do TDD in Android
ViewMatchers
ViewAssertions
Ajit Singh
singhajit
singhajit.com

KotlinConf 2018 - Best Practices for Unit Testing in Kotlin by Philipp Hauer

Recording brought to you by American Express
Unit Testing in Kotlin is fun and tricky at the same time. We can benefit a lot from Kotlin's powerful language features to write readable and concise unit tests. But in order to write idiomatic Kotlin test code in the first place, there is a certain test setup required. We'll talk about test lifecycles, mocking challenges, proper assertion libraries, the power of data classes and about spring integration. This talk contains best practices and guidelines to write unit test code in Kotlin that is idiomatic, readable, concise and produces reasonable failure messages.

About the Presenter:
Philipp Hauer works as a team lead for Spreadshirt in Leipzig, Germany. He focuses on developing JVM-based web applications and is enthusiastic about Kotlin, clean code, architectures and the sociology of software development. Moreover, Philipp is a keen blogger and tweets from time to time.

Android Testing pt. 1.1 | Local Tests

You can get the source code here


check my blog
x

Continuous Testing on Emulators Using the Espresso Test Automation Framework

Continuous testing for mobile requires that dev teams have an environment that can easily scale. Although real device testing is a must, using emulators early in the development cycle gives teams a cost-effective and quick alternative for test automation in the cloud. This webinar will explore how to implement the Espresso, a widely used framework for testing mobile apps for the Android OS, on emulators. Espresso provides APIs for writing UI tests to simulate user interactions within a single target app.

18 Testing UI with Espresso

x

Android UI Testing with Espresso and Google Cloud Test Lab

In this episode I take Espresso Test Recorder out for a spin and we record a UI test, run it on the device, look at the code it generated and then upload it to Google Cloud Test Lab to have the test run on 7 different devices.

I hope you'll enjoy following along!

Espresso Test Recorder

Contact Me @ -

Email - anujabhatt88@gmail.com

Facebook -

Instagram -

LinkedIn -

Twitter -

StackOverflow -

Android espresso test recorder

Android espresso test recorder
x

Android Tests pt 2 | Instrumented Medium Tests

You can get the source code here


Check out my blog

Android Tests pt 3.1 | Espresso Tests, Automated Disabling Animations

Learn basics of Android Espresso and how to make automated enable/disable animations on your device easy and clean!

You can get the source code here


Some stuff about Android Manifest Merger

AndroidX Running UI tests with Robolectric & Espresso | Project Nitrogen

In this video, we will see how portable UI tests can be shared between Robolectric and Espresso With Project Nitrogen. Project Nitrogen is Project alias for the initiative to write Portable UI tests in android. Project Nitrogen allows us to seamlessly move tests between JVM, real and virtual Android Devices.

You can find the previous video here :

Frictionless Android testing: write once, run everywhere (Google I/O '18)

There are many testing tools available for Android, and selecting the right tool can be confusing. This session will showcase the Android Testing Support Library (ATSL) — a new set of testing APIs that allow developers to write tests of all sizes across different execution environments. These new APIs will make testing easy, reducing the cognitive load for developers and keeping them in the zone while rapidly iterating.

Rate this session by signing-in on the I/O website here →

Watch more Android sessions from I/O '18 here →
See all the sessions from Google I/O '18 here →

Subscribe to the Android Developers channel →

#io18

Android Ui Testing with Espresso and Dagger

Android UI Testing by Edward Foux
Slides:

Github project:

Shares

x

Check Also

x

Menu