Test coverage என்பது tests மூலம் execute செய்யப்படும் code-ன் அளவை அளவிடுகிறது — பொதுவாக ஒரு சதவீதமாக (உதாரணமாக 80% coverage). இది untested code-ஐ கண்டறிய பயனுள்ள metric, ஆனால் அதன் வரம்புகளை புரிந்துகொள்வது முக்கியம்: high coverage நல்ல tests-ஐ உறுதி செய்யாது.
Coverage அளவிடுவது
TEST COVERAGE = the % of code exercised by the test suite:
LINE coverage → % of code lines executed by tests
BRANCH coverage → % of branches (if/else paths) taken
FUNCTION coverage → % of functions called
STATEMENT coverage → % of statements executed
→ Coverage tools instrument the code and report what tests do/don't exercise.
