Testing
A unit test tests only the functionality of a certain component. Let's, for example, assume a button in an Android activity is used to start another activity. A unit test would determine if the corresponding intent was issued, not if the second activity was started.
An integration test would also check if the activity was correctly started.
In its current state, the Android SDK Plugin for SBT (version 1.5.7) seems to have some issues with instrumentation tests on Scala projects. For this reason there is currently no proper configuration available. Unit tests however work fine. It is even possible to set them up with ScalaTest and Robolectric, as discussed in the next chapter.
Further reading
- Android application testing with the Android test framework
vogella Android tutorial
- Android SDK Plugin for SBT samples
Sample projects on GitHub