The “Espresso Test Recorder” was presented at Google I/O 16 together with Android Studio 2.2. It was great news for Android Developer and everyone who connected with the Android Development because we can now create UI tests in just a few clicks. However, even right now (January 2020) this tool is not so popular and we will try to understand why.
First of all, let’s try to create a test case for one of the scenarios for the Standard Login screen.
Let’s go back to the previous article when we discussed frameworks for Android UI testing and try to generate test case for similar scenario. …
Testing is an essential part of the software development process and product release. Often, there is a situation when there are two mobile applications to test: iOS and Android versions.
Even here, we have different options:
Today I would like to concentrate only on UI testing, and we will analyze different solutions for UI testing Android application.
I want to make this article more descriptive, and, if you’d like, you can find a source code of similar test cases written in the same language, but using different frameworks. …
I would like to talk about sharing code between local and instrumentation test cases. We often use almost similar test data for them. It can be a factory which produces test data for us or predefined set of data. We usually split local and instrumentation test cases into different folders; it means that we should duplicate test data or factories for generating test data.
Alternatively, we can create a common test folder where we can store files, classes, functions which will be available for local and instrumentation tests.
Recently was announced that we can run Espresso tests with a Robolectric framework. However, we would like to avoid code duplication if we want to have a possibility of running the same tests cases as local and instrumentation tests. We have different folders for local and instrumentation tests, and we can create a shared folder for test cases which can be run as local or instrumentation tests. …
Testing allows us to improve the quality of the product because after any changes you can be sure that all your basic functionality works correctly.
We can test different parts of our application, and one of these parts are notifications (almost all application use them for different purposes). Recently, I wrote, “Guide: Android notifications” and if you are not familiar with this topic, I recommend to read it, because it allows you to improve knowledge about this topic.
The NotificationDemo repository contains demo application for Android notifications and UI tests from the project. …
Google announced Kotlin as official language for Android development. One of the greatest feature of Kotlin is that you do not need to rewrite existing projects to Kotlin, you can just continue working on an existing Java project and add new feature.
Today I would like to suggest how to start working with Kotlin in your project and replace part of existing Java code fast. This small change is fully compatible with Java. It allows you to reduce the amount of Java code and make it simpler to support.
One of things, which you can find in almost every project, are POJO classes. …