If the tests have complete branch coverage then we can say it also has complete statement coverage, but not the vice versa.
100% branch coverage => 100% statement coverage
100% statement coverage does not imply 100% branch coverage
the reason is in branch coverage apart from executing all the statements, we should also verify if the tests executes all branches, which can be interpreted as covering all edges in the control flow branch
if(a){ if(b){ bool statement1 = true; } }
a = true, b = true will give 100% statement coverage, but not branch coverage
![enter image description here](https://i.stack.imgur.com/QrUkv.png)
In the branch coverage we need to cover all the edges, which we missed in the statement coverage shown as red lines in the above image
Related Posts:
- Using prevNext Modx Addon
- TypeError: only integer scalar arrays can be converted to a scalar index with 1D numpy indices array
- Substring in excel
- What is the difference between POST and PUT in HTTP?
- How does npm start work? What all processes are happening in the background?
- What is the := operator?
- What is Xpenology? Is it Linux related thing?
- Create blank image in Imagemagick
- Exception in thread “AWT-EventQueue-0” java.lang.NullPointerException Error
- Different between ./ , ../ , ../../ , ~/ on file path(URL) in asp.net
- Difference between associative entity and associative relationship attribute?
- max value of integer
- How to install apoc for neo4j?
- Is there a way to get Bing’s photo of the day?
- Chrome: Uncaught SyntaxError: Unexpected end of input
- Muting a Discord user on my Server
- Plot logarithmic axes with matplotlib in python
- Regex lookahead, lookbehind and atomic groups
- What is the difference between == and equals() in Java?
- XQuery data and text() function
- PHP – exit or return which is better?
- How do you copy and paste into Git Bash
- What does “?” mean in Java?
- git pull on a different branch
- MIPS fetch address not aligned on word boundary, used .align 4, still no go
- How to resolve ‘preflight is invalid (redirect)’ or ‘redirect is not allowed for a preflight request’
- Implement touch using Python?
- How to override equals method in Java
- How to convert .crt cetificate file to .pfx
- Manually create a pyspark dataframe
- Couchbase query using “\uefff” break the next conditional keys
- VMWare Workstation VM not starting because of locked portion of file
- How do you loop in a Windows batch file?
- Android Completely transparent Status Bar?
- How to sign-extend a number in Verilog
- How to draw a checkmark / tick using CSS?
- c array – warning: format not a string literal
- Create Hyperlink in Slack
- Missing value auth-url required for auth plugin password
- JMS Topic vs Queues
- How to set the authorization header using cURL
- yum error “Cannot retrieve metalink for repository: epel. Please verify its path and try again” updating ContextBroker
- OCaml: Match expression inside another one?
- How can I add numbers in a Bash script?
- Swift protocols: method does not override any method from its superclass
- What is index.js used for in node.js projects?
- Reference Error: moment is not defined (Using moment.js)
- What should be hadoop.tmp.dir ?
- How does DHT in torrents work?
- C++ undefined reference to WinMain@16 (Code::Blocks)
- Lambda Calculus Reduction steps
- PostgreSQL: Query has no destination for result data
- server error:405 – HTTP verb used to access this page is not allowed
- Subtract 1 day with PHP
- Node inconsistent with parents in JAGS model (R)
- python 3.x ImportError: No module named ‘cStringIO’
- error: unknown type name ‘bool’
- How can I enable Assembly binding logging?
- Why am I getting “Indicate whether to send a cookie in a cross-site request by specifying its SameSite attribute”?
- When should one use a ‘www’ subdomain?
- How can I completely uninstall and then reinstall Meteor.js?
- How to enable Location access programmatically in android?
- Normalizing a list of numbers in Python
- Fastest way to extract frames using ffmpeg?
- what is the difference between bisizeimage , bisize and bfsize?
- Is there an Amazon.com API to retrieve product reviews?
- Efficient Taxonomy Intersection
- Using stackexchange markup in WordPress (plugin?)
- How to reference a function from a class in a different file which is also namespaced?
- Simple JS function Not Working
- Password protected Profile View
- Can't get on my own web page
- Home screen width Stretch [closed]
- Hide Slider on Post Type Page
- Redirect after scrolling the page
- Follow author on muti-user WordPress site
- Any benefit or detriment from removing a pagefile on an 8 GB RAM machine?
- How do I view the details of a digital certificate .cer file?
- How do you validate fstab without rebooting?
- DNS – NSLOOKUP what is the meaning of the non-authoritative answer?
- Why can’t a CNAME record be used at the apex (aka root) of a domain?
- How can I upgrade to Java 1.8 on an Amazon Linux Server?
- What port should I open to allow remote desktop?
- Can you help me with my capacity planning?
- Cheat Sheets for System Administrators?
- Amazon EC2 terminology – AMI vs. EBS vs. Snapshot vs. Volume
- How to change an EC2 instance’s security group
- What type of DNS record is needed to make a subdomain?
- Multiple SSL domains on the same IP address and same port?
- IPTABLES – Limit rate of a specific incoming IP
- How to set default Ansible username/password for SSH connection?
- Can I make `find` return non-0 when no matching files are found?
- Proxy Error 502 “Reason: Error reading from remote server” with Apache 2.2.3 (Debian) mod_proxy and Jetty 6.1.18
- What is the difference between service and systemctl?
- Rsync creates a directory with the same name inside of destination directory
- How Often Do Windows Servers Need to be Restarted?
- sudoers: how to disable requiretty per user
- dig show only answer
- SSD or HDD for server
- Do you have any useful awk and grep scripts for parsing apache logs? [closed]