Showing posts from October, 2016

Counting Android project Code Coverage with JaCoCo: Part I - What is Code Coverage?

As you may not know, I am a full time developer and in my spare time, I read books and watch romantic comedies a lot.
Just kidding, I do not watch romantic comedies a lot, I almost watch superhero movies.
Recently, there have been Internet problems in Vietnam so that I have not had such a good connection to enjoy the movies. So, I have resumed writing tech blog posts.
What is Code Coverage? In one of previous entries, I mentioned Test-driven development (TDD), a software development process in which writing test is the first step and the software is developed to pass the newly-added test cases. Your code must pass the test cases first, but if you only test a small proportion of your code, how much confidence can you have in it?

There are some ways those can be used to determine how well your tests exercise your code. The TDD proponents often tend to push Code Coverage as a useful metric for gauging how much your tests cover your source code. Code Coverage measures how many lines/bloc…