I regularly achieve 100% coverage of libraries using TDD, but not always, and there always seem to be parts of applications left over that are untested and uncovered.
Then there are the cases when you start with legacy code that has very few tests and very little coverage.
Please say what your situation is and what has worked that at least improved coverage.
I'm assuming that you are measuring coverage during unit testing, but say if you are using other techniques.
Code Coverage Analysis is simply a structural testing technique to measure how many lines/blocks/arcs of your implemented code are executed while the automated tests are running. Its analysis gives you a quick, automated and accurate quality & coverage measurement for test plans.
Delete code.
This isn't snarky, but actually serious. Any time I would see the smallest amount of code duplication or even code that I couldn't get to execute, I deleted it. This increased coverage and increased maintainability.
I should note that this is more applicable to increasing the coverage of old code bases vs. new code bases.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With