title: Start Selenium RC server automatically
body: <p>How can I automatically start and stop the Selenium RC server when I run my phpunit tests?</p>
  
  <p>I thought I could create a little bash script that does something like this (does not work though):</p>
  
  <pre><code>java -jar ~/bin/selenium-server-standalone-2.0b3.jar &amp;
  phpunit --configuration suite.xml &amp;&amp;
  killall java
  </code></pre>
  
  <p>Surely there's a way to do that right?  To make the first line run in the background, and the second block execution until completion.</p>
  
  <p>Or is there another good way of doing this?  Does phpunit have a facility for running a process first?</p>
  
  <p>I feel like I need to completely automate this because if I forget to start the server, phpunit doesn't even throw any errors, it just skips the tests!</p>