December 2013
Beginner
416 pages
12h 45m
English
JUnit makes it easy to test classes that contain no Android code, but how do you test classes that contain calls to Android-specific SDK methods? How do you test classes that are Android applications, Android activities, or Android services? Android extends JUnit to allow you to easily test your code. Currently, Android uses a slightly older version of JUnit (JUnit 3), but the techniques that you learned earlier in this chapter still apply.
When testing an activity, you can run the test in the emulator or on a device, but the test won’t run the full application; instead, it runs only part of the app. Android implements a set of instrumentation methods that help you write and test your code.
Here are the ...
Read now
Unlock full access