Reader small image

You're reading from  Mastering Android Studio 3

Product typeBook
Published inAug 2017
Reading LevelIntermediate
Publisher
ISBN-139781786467447
Edition1st Edition
Languages
Right arrow
Author (1)
Kyle Mew
Kyle Mew
author image
Kyle Mew

Kyle Mew has been programming since the early '80s and has written for several technology websites. Also, he has written three radio plays and four other books on Android development.
Read more about Kyle Mew

Right arrow

JUnit testing

No development project is complete until it has been thoroughly and rigorously tested, and Android Studio incorporates JUnit testing directly into the workspace. As the name suggests, the framework allows the testing of individual units of code. These are often individual modules but can just as likely be a single class or method.

The Android Studio JUnit test framework provides for two distinct types of test. They are as follows:

  • Local unit tests are used to test business logic in an isolated environment that is not dependent on Android components or other code, although it is possible to mock some dependencies. These tests run on the local Java virtual machine and are consequently considerably faster than testing on a hardware device or emulator.
  • Instrumented tests are used when we want to test elements of the Android framework itself, such as how our UIs behave...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Mastering Android Studio 3
Published in: Aug 2017Publisher: ISBN-13: 9781786467447

Author (1)

author image
Kyle Mew

Kyle Mew has been programming since the early '80s and has written for several technology websites. Also, he has written three radio plays and four other books on Android development.
Read more about Kyle Mew