title: Jasmine CI and Capturing Test Result Output on Jenkins Server
body: <p><strong>Background</strong>:</p>
  
  <p>Have inherited a Ruby on Rails 3.1.x project which is in need of some BDD and testing for Javascript code.  So following the <a href="https://github.com/pivotal/jasmine-gem">Instructions</a> I have added the <strong>jasmine</strong> gem for JS testing. This works ok via <strong>rake jasmine</strong> and gives me the local web-server accessible via <a href="http://some-host.com:8888/">http://some-host.com:8888/</a></p>
  
  <p><strong>Problem</strong>:</p>
  
  <p>What I want to do is use the tests on the CI server, which is running Jenkins.  The Jenkins project is setup with the command <code>rake jasmine:ci</code> to run the CI variant of Jasmine.  The output on the Jenkins build console log is below:</p>
  
  <pre><code>Waiting for jasmine server on 32901...
  jasmine server started.
  Waiting for suite to finish in browser ...
  ................
  
  Finished in 0.00454 seconds
  16 examples, 0 failures
   * Stopping Xvfb :66.0 Xvfb
     ...done.
  </code></pre>
  
  <p>I'd like to capture the output; as in the view that is generated from the Jasmine web server page and preserve this with the build run.  I've tried the obvious of seeing if there is an <code>-o &lt;filename.out&gt;</code> option, but not had any success.</p>
  
  <p>Does anyone know how to capture the output in the context of running in a CI instance ?  Does it require <strong>PhantomJS</strong> ?</p>