Exploring the Android build process: Caching

One of my last tasks @ASOS was to investigate the slow build speeds of the Android application. This post is part of a short series about how we approached the problem, what we tried and what we found out. To be clear, don’t expect miracles and 🦄 here, but you’ll get a better understanding of what you can do to optimise your builds.
read more

Running Android unit / instrumentation tests from the console

Unit tests

Here’s a few handy commands if you want to run only a specific unit test(s). Suppose we have the following unit tests in the project:
unit_tests

./gradlew test – run unit tests for all variants
./gradlew testDebug – run tests for Debug variant
./gradlew testDebug --tests="*.helpers.*" – run all tests in the helpers package
./gradlew testDebug --tests="*.HelperTest" – run all tests in HelperTest.java class
./gradlew testDebug --tests="*.getHelp" – run only the getHelp test method.
read more