Code Coverage and Good Tests

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/5

encourage image

There's no tags or description

Looks like no tags are added yet.

6 Terms

1
New cards

What does coverage tell you?

Which lines, branches, or paths were executed by tests

2
New cards

What does coverage NOT tell you?

It does not tell you whether the expected result came from the requirements or whether the assertions were strong. Best used to find missing code after you already designed black box tests from contracts

3
New cards

Line coverage asks…

Did each executable line run at least once?

4
New cards

Branch coverage asks…

Did each decision run through its true and false case

5
New cards

Path thinking asks…

Can we choose inputs that exercise important combinations of decisions?

6
New cards

What makes a test good?

A test must be focused, independent, deterministic, readable, rooted in black-box/whitebox testing, and capable of failing