How can I automatically start and stop the Selenium RC server when running phpunit tests?
I thought I could create a little bash script that does something like this (doesn't work):
java -jar ~/bin/selenium-server-standalone-2.0b3.jar & phpunit --configuration suite.xml && killall java
Is there really a way to do this right? So that the first line runs in the background, and the execution of the second block to completion.
Or is there another good way to do this? Does phpunit have a means to start the process first?
It seems to me that I need to fully automate this, because if I forget to start the server, phpunit will not even throw any errors, it will just skip the tests!
source share