News Feed
Sections




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

Inviqa techPortal:
Functionally Testing You Application Using Mink
May 02, 2013 @ 13:50:44

On the Inviqa TechPortal today there'a a new post from Konstantin Kudryashov showing you how to use Mink for functional testing (an extension of Behat) of you web application.

Automated testing is big news these days. There's hardly a PHP conference happening without a talk on testing automation or derivative methodologies. TDD (Test-Driven Development) and BDD (Behaviour Driven Development) are all around us. So why should you care about all this? [...] The more complex an application becomes, the harder it is to be sure that each new feature or bug fix won't break the system, and that decreases your overall confidence in your work as developer. That's exactly the reason why you need automated testing - to be confident that you're not breaking important parts of an application.

For his examples he uses a simple Silex-based application (found here on github) that just shows a main page and an "add article" page that returns a preview when submitted. He shows how to get Behat/Mink installed and how to bootstrap PHPUnit to allow you to execute your tests. Also included is a sample test that clicks the "Add Article" link, runs a few checks and fills in some data. The form is submitted and the "preview" page is checked for valid results.

0 comments voice your opinion now!
functional testing behat mink phpunit tutorial

Link: http://techportal.inviqa.com/2013/05/02/functionally-testing-your-application-using-mink

blog comments powered by Disqus

Similar Posts

ThinkPHP Blog: Methods to Reduce the Load of Your Webserver by Caching Content

DZone.com: Using a stream wrapper to access CouchDb attachments with PHP

Fabien Potencier's Blog: Create your own framework...on top of the Symfony2 Components (parts 3 & 4)

Fabien Potencier's Blog: Parsing XML documents with CSS selectors

Sameer Borate's Blog: Read the version of a PDF in PHP


Community Events

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


community podcast api conference language symfony laravel interview series yii2 introduction part2 project example opinion composer application php7 list framework

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