2

I would like to know is there any way for us to find test coverage utilizing any code coverage libraries or something similar. For example, for integration testing, I am using automated solutions. If I use any tools like jacoco or something can I find test coverage? For all these years I was using the conventional way of user requirements, traceability matrices, test cases etc. to identify the test coverage. If in an example, I have 100 test cases and I have automated it. I can define the test coverage based on test cases in a conventional way. But how I can ensure which all parts of the actual code have been utilized during the testing.

I am trying to find something more intelligent in the new world. I heard some concepts of Justin hunters hex wise etc. But not have much more idea. Can somebody give me some insights?

  • 1
    Try asking this also in software related SE – Rsf Dec 12 '17 at 20:07
2

Every language has many tools to check code coverage. You should use the same tool your developers use to check for code coverage by unit tests. If your developers don't use unit test, or don't check coverage of code exercised by unit tests - don't even waste time. Unit tests is your first and best line of defense, start there.

Getting to 100% coverage is overkill. Covering big chunks of code handling different error conditions might be not worth the effort. Common goal is around 75%-80% coverage.

Code coverage is not Holy Grail to be attained, it is just yet another tool (not even the best or most important) in your tool belt to provide more informed opinion to management about quality status of current code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.