Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Code coverage
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Metric for source code testing}} {{About|coverage based on source code|coverage based on requirements|Test coverage}} {{Program execution}} In [[software engineering]], '''code coverage''', also called '''test coverage''', is a percentage measure of the degree to which the [[source code]] of a [[computer program|program]] is executed when a particular [[test suite]] is run. A program with high code coverage has more of its source code executed during testing, which suggests it has a lower chance of containing undetected [[software bug]]s compared to a program with low code coverage.<ref name="Brader, 2013">{{cite book|last1=Brader|first1=Larry|last2=Hilliker|first2=Howie|last3=Wills|first3=Alan|title=Testing for Continuous Delivery with Visual Studio 2012|date=March 2, 2013|publisher=Microsoft|isbn=978-1621140184|page=30|url=https://msdn.microsoft.com/en-us/library/jj159344.aspx|access-date=16 June 2016|chapter=Chapter 2 Unit Testing: Testing the Inside}}</ref><ref name="Williams 2003">{{cite web|last1=Williams|first1=Laurie|author1-link=Laurie Williams (software engineer)|last2=Smith|first2=Ben|last3=Heckman|first3=Sarah|title=Test Coverage with EclEmma|url=http://realsearchgroup.org/SEMaterials/tutorials/eclemma|website=Open Seminar Software Engineering|publisher=North Carolina State University|access-date=16 June 2016|archive-url=https://web.archive.org/web/20160314023040/http://realsearchgroup.org/SEMaterials/tutorials/eclemma/|archive-date=14 March 2016|url-status=dead}}</ref> Many different metrics can be used to calculate test coverage. Some of the most basic are the percentage of program [[subroutine]]s and the percentage of program [[statement (computer science)|statements]] called during execution of the test suite. Code coverage was among the first methods invented for systematic [[software testing]]. The first published reference was by Miller and Maloney in ''[[Communications of the ACM]]'', in 1963.<ref>{{cite journal | author = Joan C. Miller, Clifford J. Maloney | title = Systematic mistake analysis of digital computer programs | journal = [[Communications of the ACM]] | volume = 6 | issue = 2 |date=February 1963 | publisher = [[Association for Computing Machinery|ACM]] | location = New York, NY, USA | issn = 0001-0782 | pages = 58β63 | doi = 10.1145/366246.366248 | doi-access= free }}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)