Whether you want to improve your regression suite or please your team lead, increasing code coverage is a great goal. But knowing how to get started can be hard. We’ve put together some useful advice by developers, for developers, with answers to questions you might have had:
This StackExchange discussion is a good quick summary of possible solutions to a relatively common problem: needing to increase code coverage for a legacy application with a few major issues. This thread is a few years old, but the responses still hold up today.
This Medium article gives a good summary of how to use JaCoCo. Check out the comments for further discussion.
This wiki page for an open source mobile health platform is also helpful for learning how to increase coverage using JaCoCo.
This Medium-hosted article is another guide to improving code quality by increasing coverage with the JaCoCo Maven plugin.
The answers to this Quora question are specifically about using automated tests to increase code coverage, which is a good overview of some of the options available to you.
We’ve dabbled in this subject ourselves! Check out our blog for tips on using AI to increase code coverage for your Java applications.