On NetTuts.com today there's a new tutorial posted from Andrew Perkins about acceptance testing with Codeception, an alternative testing framework that's been gaining popularity in the PHP community.

Codeception is a multi-featured testing framework for PHP. It can handle unit, functional, and acceptance testing of web applications and it's powered by the already very popular PHPUnit testing framework.

Codeception allows us to test different kinds of user perspectives and site scenarios while they are visiting our app to ensure a pleasant user experience. By testing multiple scenarios, we can simulate a user's natural flow throughout our application to make sure the app is working as expecting.

The tutorial guides you through the process of getting Codeception up and running and creating a first test. The example test hits a basic PHP-enhanced HTML page to uppercase a given string. They show how to create the test skeleton and flesh it out with a test for the page load as well as the form submission.

This is guest post by Ragazzo. He uses Behat as well as Codeception for making his project better. He was often asked to do a comparison between Codeception, Behat, and PhpUnit. In this post he explains the commons and different parts of this products.

The author talks some about the difference between functional/acceptance tests and how they fit in with behavior driven development. He includes some examples of Behat test formats (Gherkin) and how it can be used for both the functional and acceptance side of things. He also talks some about why he prefers Codeception over Behat(+Mink) for his testing. A sample Codeception test is included, showing a login form check.

On PHPMaster.com today there's a new tutorial posted showing you how to use the Codeception testing tool to perform some acceptance/functional testing of your application.

What happens if you have more tests then zergs in the swarm? Really much more. You should find a way to control and manage them. In this article I'll share some hints and best practices you may use writing acceptance tests. I'll use Codeception testing framework to illustrate the best practices, but surely, they can be ported to any acceptance framework you use for testing.

He introduces the Codeception tool and some of the features it includes. He recommends using it to coordinate all of your testing as it can handle PHPUnit and Selenium tests as well as generate its own code coverage reports. He includes some code showing a basic test, making a request to a page, checking for contents and clicking on some links. He also shares a few design patterns using the tool - Page Object and Controller test examples.

Acceptance Test-Driven Development is an Agile technique that extends the test-first approach to the development of the front end of an application. The mechanics of Acceptance TDD are clear: first you write a test which defines the goal of your development, which is basically the feature you're adding to your application. As with all TDD variants, this test must fail.

With the help of the Zend_Test component, your tests can execute through the full MVC stact of your application (including views) to check to see if the resulting content matches certain criteria. He includes a few code examples showing content searching (contains), validating the query string and checking for a redirect.

In this article I introduce the topic of Acceptance Testing (aka Functional Testing), something more PHP programmers should be starting to practice. I'm sure many of us are well aware of Unit Testing and even Integration Testing so where does this third wheel come into play for web applications given our growing obsession with Web 2.0 and AJAX and how does it differ from the former two practices? Below I'll explain this.

They start by asking "Why acceptance testing?" at all with an answer of "it's not about isolated testing, but testing as a whole". The rest of the article is broken up into several parts:

Of User Stories and Acceptance Tests

The Iteration Plan

Preparing For Acceptance Testing (setting up PHPUnit and Selenium)

Writing And Running The Acceptance Tests

How to run the tests

In their example they show how to validate that a login on the site works as expected (including interacting with a form on the page).