NYCPHP Meetup

NYPHP.org

[nycphp-talk] Unit Testing with PHP: PHPUnit and Selenium

Rob Marscher rmarscher at beaffinitive.com
Tue Dec 27 13:57:36 EST 2011


On Dec 27, 2011, at 1:38 PM, Nelly Yusupova wrote:
> We are setting up an environment for running unit tests for our PHP application.  
> 
> We installed PHPUnit testing framework and were thinking of using it with Selenium.  There is lots of examples online of people who used PHPUnit & Selenium together but I've read that the support of PHP in Selenium is deprecated and I’m wondering if this is the right way to go.
> 
> I would love to hear your experiences with PHP unit testing frameworks and if you are using unit testing, what does your set up look like.


I've yet to do it, but running a WebDriver server sounds pretty cool: http://code.google.com/p/selenium/wiki/RemoteWebDriverServer

I'm pretty sure WebDriver is just the name for what Selenium has become.  The php bindings have activity from this fall: http://code.google.com/p/php-webdriver-bindings/source/list

I wouldn't really say that using Selenium or WebDriver would be considered a "unit test" as much as it is functional and/or integration testing.

PHPUnit is still pretty good for testing and integrates well with continuous integration servers (I have it running with Atlassian Bamboo).

I've been using the Lithium framework which also has a nice built-in test suite: http://lithify.me/docs/manual/quality-code/testing.wiki

-Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20111227/cdaae4bb/attachment.html>


More information about the talk mailing list