టెస్ట్ కవరేజ్ కోడ్లో ఎంత భాగం టెస్ట్ల ద్వారా ఎక్జిక్యూట్ చేయబడుతుందో కొలుస్తుంది — సాధారణంగా శాతం వలె (ఉదా: 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.
