Semua buku

Profesional

Aplikasi Tentang Pelatih Masuk Mulai membaca

Computer Science · Glosarium

Apa itu Statement, branch and path coverage?

Dikenal juga sebagai: statement coverage · branch coverage · path coverage

Definition 7.9 University Computer Science — Year 1 · Bab 7 — Modular Programs, Makefiles and Tests

A test suite reaches statement coverage of a function if its tests together execute every statement; branch coverage if they take every arc of every decision, both the true and the false one; path coverage if they follow every feasible path.

The control-flow graph of classify, each compound condition drawn as one decision. The three tests of the first run follow three paths; the dashed arcs are taken by none of them, so lines 7 and 13 never run.
The control-flow graph of classify, each compound condition drawn as one decision. The three tests of the first run follow three paths; the dashed arcs are taken by none of them, so lines 7 and 13 never run.
Baca dalam konteks →