title: Jenkins Cobertura (with gcov) - what do the coverage statistics mean?
body: <p>I'm currently writing unit tests for a <code>Qt</code> project. I wanted to use the statistics provided in Jenkins through the <strong>Cobertura</strong> plugin (underneath <code>gcov</code> is used to get the stats).</p>
  
  <pre><code>:~$ gcov -v
  gcov 5.4.0 20160609
  
  :~$ gcc -v
  gcc version 5.4.0
  </code></pre>
  
  <p>However after I looked at the table (see below) I was really surprised to see the poor coverage especially of conditionals. For the first one (see <em>Coverage Breakdown by File</em>) I thought I was actually done, since the code has only three <code>if</code>s(each with a single condition) and my tests covers all (checked this also through debugging just to make sure). So I am really confused what these numbers actually mean and how to interpret them in order to make my unit tests better.</p>
  
  <p><a href="https://i.stack.imgur.com/Fl0FA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Fl0FA.png" alt="enter image description here"></a></p>
  
  <p>I've even started thinking that some of the poor results might be due to the use of <code>Qt</code> since it's not exactly pure C++ and all "extras" (slots, signals, MOC files etc.) might be something that <code>gcov</code> can't handle properly.</p>