Process / pipelineTest measurement

การวิเคราะห์ความครอบคลุมของโค้ด

การวิเคราะห์ความครอบคลุมของโค้ด (Code Coverage Analysis) เป็นการวัดขอบเขตที่ซอร์สโค้ดถูกเรียกใช้งานโดยชุดทดสอบ ซึ่งเป็นการวัดปริมาณว่าบรรทัด (lines), เงื่อนไข (branches), หรือเส้นทางการทำงาน (paths) ใดบ้างที่ถูกทดสอบ เครื่องมือจะทำการปรับแต่งโค้ด (instrumentation) เพื่อติดตามการทำงาน และรายงานผลเป็นเปอร์เซ็นต์ความครอบคลุม พร้อมทั้งระบุส่วนของโค้ดที่ยังไม่ถูกทดสอบ การวิเคราะห์ความครอบคลุมช่วยในการสร้างชุดทดสอบ ตรวจจับโค้ดที่ไม่ได้ใช้งาน (dead code) และยืนยันความเพียงพอของชุดทดสอบในกระบวนการประกันคุณภาพ

เปิดใน MethodMindเร็ว ๆ นี้วิดีโอเร็ว ๆ นี้Download slides

อ่านวิธีฉบับเต็ม

สำหรับสมาชิกเท่านั้น

เข้าสู่ระบบด้วยบัญชีฟรีเพื่ออ่านส่วนนี้

เข้าสู่ระบบ

Method map

The neighbourhood of related methods — select a node to explore.

แหล่งอ้างอิง

  1. 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
  2. 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
  3. 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 side by side

ถูกอ้างอิงโดย

ScholarGateCode Coverage Analysis (Code Coverage Measurement and Analysis). สืบค้นเมื่อ 2026-06-15 จาก https://scholargate.app/th/software-engineering/code-coverage-analysis · ชุดข้อมูล: https://doi.org/10.5281/zenodo.20539026