title: Cannot generate a cobertura.xml file from lcov.info or coverage.json file in Jenkins VirtualEnv
body: <p>I have a ready javascript file that run all unit tests and coverage. And the script is generating coverage.json file. I favor using the cobertura plugin (<a href="https://wiki.jenkins-ci.org/display/JENKINS/Cobertura+Plugin" rel="nofollow noreferrer">https://wiki.jenkins-ci.org/display/JENKINS/Cobertura+Plugin</a>) so I was looking for a solution to create the cobertura-suitable file format which is xml.</p>
  
  <p>I do everything in VirutalEnv(<a href="https://wiki.jenkins-ci.org/display/JENKINS/ShiningPanda+Plugin" rel="nofollow noreferrer">https://wiki.jenkins-ci.org/display/JENKINS/ShiningPanda+Plugin</a>)!</p>
  
  <p>I tried this command:<code>istanbul report cobertura --root $WORKSPACE/coverage/coverage.json --dir coverage/</code> (<a href="https://github.com/gotwarlost/istanbul" rel="nofollow noreferrer">https://github.com/gotwarlost/istanbul</a>)</p>
  
  <p>And the result is as follows:</p>
  
  <pre><code>13:26:09 [...]
  13:26:09   210 passing (1s)
  13:26:09 
  13:26:09 =============================================================================
  13:26:09 Writing coverage object [/var/lib/jenkins/workspace/unit-tests-client-javascript/coverage/coverage.json]
  13:26:09 Writing coverage reports at [/var/lib/jenkins/workspace/unit-tests-client-javascript/coverage]
  13:26:09 =============================================================================
  13:26:09 
  13:26:09 =============================== Coverage summary ===============================
  13:26:09 Statements   : 96.88% ( 279/288 )
  13:26:09 Branches     : 86.24% ( 94/109 ), 1 ignored
  13:26:09 Functions    : 100% ( 57/57 )
  13:26:09 Lines        : 96.88% ( 279/288 )
  13:26:09 ================================================================================
  13:26:11 + istanbul report cobertura --root /var/lib/jenkins/workspace/unit-tests-client-javascript/coverage/coverage.json --dir coverage/
  13:26:11 Done
  13:26:11 [Cobertura] Publishing Cobertura coverage report...
  13:26:11 Publishing Cobertura coverage results...
  13:26:11 Cobertura coverage report found.
  13:26:11 Finished: SUCCESS
  </code></pre>
  
  <p>However, the created cobertura-coverage.xml file is almost empty!</p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;
  &lt;!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd"&gt;
  &lt;coverage lines-valid="0"  lines-covered="0"  line-rate="1"  branches-valid="0"  branches-covered="0"  branch-rate="1"  timestamp="1483968808589" complexity="0" version="0.1"&gt;
  &lt;sources&gt;
      &lt;source&gt;/var/lib/jenkins/workspace/unit-tests-client-javascript&lt;/source&gt;
  &lt;/sources&gt;
  &lt;packages&gt;
  &lt;/packages&gt;
  </code></pre>
  
  <p></p>
  
  <p>And the code cobertura code coverage tool shows nothing! 0!!</p>
  
  <p>I also tried using the lcov-to-cobertura-xml(<a href="https://github.com/eriwen/lcov-to-cobertura-xml" rel="nofollow noreferrer">https://github.com/eriwen/lcov-to-cobertura-xml</a>), but the result is as follows:</p>
  
  <pre><code>14:33:24 [...]
  14:33:24 + git clone https://github.com/eriwen/lcov-to-cobertura-xml.git
  14:33:24 Cloning into 'lcov-to-cobertura-xml'...
  14:33:27 + pip install /var/lib/jenkins/workspace/unit-tests-client-javascript/lcov-to-cobertura-xml/.
  14:33:27 Processing ./lcov-to-cobertura-xml
  14:33:27   Requirement already satisfied (use --upgrade to upgrade): lcov-cobertura==1.6 from file:///var/lib/jenkins/workspace/unit-tests-client-javascript/lcov-to-cobertura-xml in /var/lib/jenkins/shiningpanda/jobs/e24105b6/virtualenvs/d41d8cd9/lib/python2.7/site-packages
  14:33:27 Building wheels for collected packages: lcov-cobertura
  14:33:27   Running setup.py bdist_wheel for lcov-cobertura: started
  14:33:28   Running setup.py bdist_wheel for lcov-cobertura: finished with status 'done'
  14:33:28   Stored in directory: /var/lib/jenkins/.cache/pip/wheels/06/91/3e/ead128a367068e0e33fd380f090030c829dff190d4099a2e3b
  14:33:28 Successfully built lcov-cobertura
  14:33:28 + lcov_cobertura coverage/lcov.info --base-dir /var/lib/jenkins/workspace/unit-tests-client-javascript --excludes /var/lib/jenkins/workspace/unit-tests-client-javascript/test --output coverage/coverage.xml
  14:33:28 /tmp/shiningpanda2010602884229553447.sh: line 40: lcov_cobertura: command not found
  14:33:28 Build step 'Virtualenv Builder' marked build as failure
  14:33:28 Finished: FAILURE
  </code></pre>
  
  <p>What am I doing wrong? Wasted so many hours trying to solve this!!! Maybe I should use another tool that can transform the coverage.json file into chart or graph visualisation of code coverage?</p>