การวิเคราะห์ความครอบคลุมของโค้ด
การวิเคราะห์ความครอบคลุมของโค้ด (Code Coverage Analysis) เป็นการวัดขอบเขตที่ซอร์สโค้ดถูกเรียกใช้งานโดยชุดทดสอบ ซึ่งเป็นการวัดปริมาณว่าบรรทัด (lines), เงื่อนไข (branches), หรือเส้นทางการทำงาน (paths) ใดบ้างที่ถูกทดสอบ เครื่องมือจะทำการปรับแต่งโค้ด (instrumentation) เพื่อติดตามการทำงาน และรายงานผลเป็นเปอร์เซ็นต์ความครอบคลุม พร้อมทั้งระบุส่วนของโค้ดที่ยังไม่ถูกทดสอบ การวิเคราะห์ความครอบคลุมช่วยในการสร้างชุดทดสอบ ตรวจจับโค้ดที่ไม่ได้ใช้งาน (dead code) และยืนยันความเพียงพอของชุดทดสอบในกระบวนการประกันคุณภาพ
อ่านวิธีฉบับเต็ม
เข้าสู่ระบบด้วยบัญชีฟรีเพื่ออ่านส่วนนี้
Method map
The neighbourhood of related methods — select a node to explore.
แหล่งอ้างอิง
- Zhu, H., Hall, P. A. V., & May, J. H. R. (1997). Software unit test coverage and adequacy. ACM Computing Surveys, 29(4), 366–427. DOI: 10.1145/267580.267590 ↗
- Frankl, P. G., & Weiss, S. N. (1988). An experimental comparison of the effectiveness of branch testing and data flow testing. IEEE Transactions on Software Engineering, 14(12), 1763–1773. link ↗
- Corbet, J. (2008). Code coverage for the Linux kernel. Linux Weekly News article. link ↗
วิธีอ้างอิงหน้านี้
ScholarGate. (2026, June 3). Code Coverage Measurement and Analysis. ScholarGate. https://scholargate.app/th/software-engineering/code-coverage-analysis
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- แบบจำลองการทำนายข้อบกพร่องวิศวกรรมซอฟต์แวร์↔ compare
- การแบ่งพาร์ติชันสมมูล (Equivalence Partitioning Testing)วิศวกรรมซอฟต์แวร์↔ compare
- การวัดความซับซ้อนของซอฟต์แวร์วิศวกรรมซอฟต์แวร์↔ compare
- การวิเคราะห์โค้ดแบบสแตติกวิศวกรรมซอฟต์แวร์↔ compare