News Feed
Sections




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

Shashikant Jagtap's Blog:
PHPUnit + Behat/Mink + Page Object The Rockstar Combination of Testing
April 20, 2012 @ 10:49:54

Earlier this month Shashikant Jagtap wrote up a post about a powerful combination in testing your applications - a "rockstar" combo of PHPUnit + Behat/Mink + Page Object to give you a great foundation for BDD (behavior-driven) testing.

Last month, we had discussion about implementing page object pattern in Behat/Mink framework at London Behat Users meetup. Page object pattern is a cool way to make tests maintainable, reusable and readable. Everyone was interested to know more about Page Object Pattern. In this short tutorial, we will implement Mink and PHPUnit combination for functional testing. Mink and PHPUnit combined with Pageness (Page Object) can be used for maintainable and readable tests.

He assumes that you might not have all the tools needed installed, so he walks you through the setup/install of PHPUnit, the PHPUnit-Mink framework and both the Sahi and Selenium drivers. He includes a basic directory structure for the testing and shows how to create some Page Object classes that extend the default TestCase and make calling the remote resource simple. He also includes the steps needed to execute the tests via PHPUnit.

0 comments voice your opinion now!
phpunit behat bdd testing mink pageobject


blog comments powered by Disqus

Similar Posts

Lars Tesmer's Blog: How to Unit Test a Class Making Calls to an URL (or the Filesystem) With PHPUnit

NetTuts.com: Laravel, BDD and You: The First Feature

Ben Ramsey's Blog: Lampooning Benchmarks

Rob Allen: Setting up PHP & MySQL on OS X 10.8 Mountain Lion

Jeremy Cook's Blog: Making PHPUnit, Doctrine & MySQL Play Nicely


Community Events

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


laravel community example introduction version conference voicesoftheelephpant api podcast release opinion php7 symfony2 interview series performance framework composer library extension

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