O'Reilly logo

Mastering Android Studio 3 by Kyle Mew

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Local unit tests

If you have created an Android Studio project using the project wizard, then the basic test case for both test types will have been created automatically. The wizard will also include the necessary Gradle dependencies. If you are using a project created any other way, you will need to create a test directory structure and include Gradle dependencies by hand. These steps are outlined as follows:

  1. Inside your module/src directory, create a new folder alongside src/main called src/test.
  2. Inside this test directory, recreate the folder structure inside your main directory, for example:
main/java/com/packt/chapterseven 
  1. This directory is where you will place your test classes, and it will now be accessible from the IDE's project ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required