News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Codeception.com:
Working with PHPUnit and Selenium Webdriver
November 21, 2013 @ 12:15:43

On the Codeception site they've recently posted a guide to using PHPUnit and the Selenium Webdriver to easily create functional tests for your application. They make use of the php-webdriver library from Facebook to make the connection inside the tests.

In this post we will explore some basics of user acceptance testing with Selenium. We will do this with classical unit testing framework PHPUnit, web browser Firefox, and with new php-webdriver library recently developed by Facebook. Selenium allows us to record user actions that we do inside a browser and then automate them. PHPUnit will be used to do various assertions and check them for fallacy. And php-webdriver is used to connect PHP with Selenium, in order to do browser manipulation in PHP.

They walk you through the installation process (pretty simple with Composer) and show you how to start up a standalone Selenium server to receive the test commands. From there they start in on the test examples make with PHPUnit, first creating a simple test that connects to Github and looks for "Github" in the page title. They list some of the more complex selector functions and put them to use finding an object by ID. Finally, they include a few handy tips about locating elements, handling "not found" items and some refactoring and test structure suggestions.

0 comments voice your opinion now!
phpunit selenium webdriver facebook tutorial functional testing

Link: http://codeception.com/11-12-2013/working-with-phpunit-and-selenium-webdriver.html

blog comments powered by Disqus

Similar Posts

PHPImpact Blog: From Swift Mailer to Zend_Mail

DevShed: Building a Data Validation System with the Prototype Pattern with PHP 5

Re-Cycled Air Blog: PHP Dark Arts: Daemonizing a Process

Arnold Daniels' Blog: Migrating from PHP4 to PHP5: A strategy for hosts

SitePoint PHP Blog: How to Roll Your Own JavaScript Compressor with PHP and the Closure Compiler


Community Events





Don't see your event here?
Let us know!


opinion update deployment package podcast symfony series zendserver framework laravel api release list tips interview language install community introduction library

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework