Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects simply to a non-technical, business audience. Over…
Branch coverage testing is a methodical type of testing which requires that all program branches or conditional states be tested at least once during a testing process.
In branch coverage testing, each different outcome from a code module is tested. For example, if the outcomes are binary, developers test both outcomes. Likewise, if there is a code function that tests a range of values, each of those valued outcomes are tested. If a function returns either a yes or a no value, the test must input each of these values and test the result.
By nature, branch coverage testing is different than other broader forms of testing. It represents a rigid conditional requirement that may not be entirely feasible in all cases. Some developers and others that talk about branch coverage testing suggest that a certain percentage of coverage is adequate, while others have noted that developers may work up two or three different testing strategies to ensure that they cover all code module branches – or as many as possible.
As a type of tactical testing, branch coverage testing is more of a metric used to gauge testing outcomes than a testing philosophy or broader-based testing strategy idea.
Techopedia’s editorial policy is centered on delivering thoroughly researched, accurate, and unbiased content. We uphold strict sourcing standards, and each page undergoes diligent review by our team of top technology experts and seasoned editors. This process ensures the integrity, relevance, and value of our content for our readers.
Margaret is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages.
What is AI Ethics? The field of AI ethics is about the rules and values guiding how artificial intelligence (AI)...
Maria WebbTechnology journalist
What is AI TRiSM? AI TRiSM (Trust, Risk, and Security Management) is a market segment for AI governance products and...
Margaret RouseTechnology Expert
What is Know Your Customer (KYC)? Know Your Customer (KYC) is the process that financial institutions such as banks use...
Nicole WillingTechnology Journalist
Trending NewsLatest GuidesReviewsTerm of the Day