Testų aprėptis matuoja, kiek testais vykdomo kodo — paprastai procentais (pvz., 80% aprėpties). Tai naudingas rodiklis neįtestintam kodui rasti, tačiau svarbu suprasti jo ribotumą: aukšta aprėptis negarantuoja gerų testų.
Ką aprėptis matuoja
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.
