Ben Waine
Acceptance & Integration Testing Using Behat
Date: Saturday 8th October Time: 15:00 Location: Track 3
@bwaine
Ben is a software engineer at Sky Betting and Gaming and a recent graduate of Leeds Met University. He’s been hacking around with PHP for about 5 years and is particularly interested in machine learning, the social web and web application development.
In his spare time he likes to experiment with new techniques and technologies using PHP. You can find him as @bwaine on Twitter and benwaine on Github.
Acceptance & Integration Testing Using Behat
Behat is a behaviour driven development framework for PHP. It can be used to write integration and acceptance tests in a language that non developers can understand. Behat is capable of testing the response from API calls, driving selenium or even testing the output from PHP scripts. It isn’t a replacement to unit testing, but the logical next step to ensure your code plays well with others.
At SkyBet we have used Behat to streamline the process of defining acceptance criteria, creating acceptance tests and using them to drive our development. Behat co-ordinates our BAs, testers and developers and focuses them on producing the required software in a testable way.
This talk starts with a brief introduction to behaviour driven development followed by a look at Gherkin, the language used by Behat to write human readable test scenarios. Also included is an overview of how to write ‘steps’: the PHP that powers the testing of scenarios. Finally some ideas are presented on how to display the data gained from running the tests in interesting ways.
http://blip.tv/phpnw/phpnw11-ben-waine-acceptance-integration-testing-using-behat-5871700