Summary
This chapter has been a little more involved than previous ones, with the sole intention of facing realistic situations and state-of-the-art Android testing.
We started by enabling code coverage through Jacoco, running our tests, and obtaining a detailed code coverage analysis report.
We then used this report to improve our test suite. Writing tests to cover code we were not aware had not been tested. This led us to better tests, and in some cases improved the design of the project under test.
We introduced Robotium, a very useful tool to ease the creation of test cases for our Android applications, and we improved some tests with it.
Then we analyzed one of the hottest topics in Android testing; testing on the development host JVM, optimizing, and reducing considerably the time needed to run the tests. Something that is highly desirable when we are applying Test-driven Development to our process. Within this scope, we analyzed Robolectric and created some tests as demonstrations to...