Lazy Diary @ Hatena Blog

PowerShell / Java / miscellaneous things about software development, Tips & Gochas. CC BY-SA 4.0/Apache License 2.0

テストでカバレッジを取得する背景の意図

普通にテストするとstatement coverageは40%程度にしかならないよ、だからコードカバレッジを計測することはテストの十分性評価に意味があるんだよ、という記述が複数の文献に見られたんだけど、いずれも出典がない。これって何を計測したものなんだろう? Source lines of codeに対するstatement coverageと、Object code coverageにおけるstatement coverageで意味合いも違うと思うんだけど……

The primary value of statement testing rests in the fact that conventional test-set production methods are inadequate and tend to result in up to 40% of any piece of software not being tested (executed) at all.

  • Joe Abbott, "Software Testing Techniques", Publisher Blackwell Publishers, 1987, p.54.

Typically however, these programs do not maintain this type of information and a significant portion (up to 40%) of the software (especially error handling code) may never Oe tested.