Pokritost testov meri, koliko kode je izvedene s testi — običajno kot odstotek (npr. 80% pokritosti). To je uporabna metrika za iskanje netestirane kode, vendar je pomembno razumeti njene omejitve: visoka pokritost ne jamči dobrih testov.
Kaj pokritost meri
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.
