टेस्ट कव्हरेज हे मापन करते की कोडचा किती भाग टेस्ट्सद्वारे एक्सीक्यूट होतो — सामान्यतः टक्केवारी म्हणून (उदा. 80% कव्हरेज). हे अनटेस्टेड कोड शोधण्यासाठी एक उपयुक्त मेट्रिक आहे, परंतु त्याची मर्यादा समजून घेणे महत्त्वाचे आहे: उच्च कव्हरेज चांगल्या टेस्ट्सची हमी देत नाही.
कव्हरेज काय मापन करते
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.
