Setting animation scale for Android UI tests

Read on original site (opens in a new window)

Before testing with Espresso, it is highly recommended to disable animations. Tests may be flaky otherwise. This article describes how to do it automatically with Gradle.