title: End To End Testing on Headless Server
body: <p>I am trying to set up an environment for <strong>end-to-end</strong> testing on a droplet running Ubuntu server 12.04.3 on digital ocean.</p>
  
  <p>What I am trying to achieve in the end is for my <strong>jenkins</strong> (installed on the one droplet) to be able to run my end-to-end tests. Now, the server is ofcourse <strong>headless</strong> and the end-to-end tests need to run through a browser (I am using protractor with the selenium standalone server with chromedriver).</p>
  
  <p>My question is: <strong>how do I spawn a browser on that machine</strong>? <strong>I have installed xorg</strong> and if I do <code>startx</code> on the server, log out and <code>ssh -X</code> to it, I can manually run the end-to-end tests (a browser pops up on my local machine). But I can get it to work without <code>ssh -X</code> to it, and since jenkins is on the same droplet where the tests are to be run. Well I dont get a browser to spawn.</p>
  
  <p>NOTE: I know I might be missing something really trivial here since I don't fully understand the configuration nor the xorg.</p>
  
  <p>Any hints or a complete answer is very much appreciated, this is giving me gray hair.</p>
  
  <p>Edit: After a little digging I think i got the xorg stuff a bit wrong, i am guessing the purpose of X is to be able to spawn a window on a remote machine ( ie my local machine). And what i am after is more along the lines of a virtual frame buffer such as Xvfb...</p>