Monday, September 13, 2010

Selenium RC with generated PHP tests


  1. If you don't have it already, sudo apt-get install phpunit
  2. start the selenium server (at minimum: java -jar selenium-server)
  3. Generate the PHP testcase from the IDE.
  4. rename the class from Example to whatever you're testing.
  5. rename the file to be the same as the classname plus .php
  6. In the class, add a __construct() which calls $this->setUp() and $this->start()
  7. After the class is defined, instantiate the class and call its testcase method.


There may be syntax errors. The code generation is not perfect. Fix those.

No comments: