Is it possible to use PHPUnit as an alternative to Selenium to do GUI testing? My impression is that it is just a generic testing framework and can't handle javascri开发者_开发技巧pt, dom and other GUI aspects.
Right now I am running php+selenium rc+firefox and the overhead of the java selenium server och actually running the firefox gui makes me worry about stability and performance. GUI testing, however, works great...
Zend_Test_PhpUnit has many of functional testing features that Selenium does. Give it a try.
Zend Framework: Documentation: Zend_Test_PHPUnit
I know it's an old question but I believe using the PHPUnit class from the pear packages using the selenium RC functionalities is not the best approach. We had this discussion at my company and we tested all the wrapper classes for PHP that interacts with the selenium JSON Wire protocol in order to make use of the webdriver included in selenium 2 server but we found this as a headache. The facebook class is far from being complete and with ridiculous flaws like the send Keys command not being implemented, the Chibimagic wrapper use a horrible convention like the plain php style (using underscores instead of camel case) and the Lucas wrapper is nice but rely on a single guy keeping up the code isn't something to trust at a company level.
So we decided to use the java classes from selenium to test our GUI even when our application code is written entirely in PHP.
精彩评论