slid.es/tmf/bdd-wp

lots of globals, exits and more bad practices, that make testing hard...
The common language for
describing features and scenarios
Feature: Read published blog posts
In order to published read blog posts
As a reader
I need to be able to see a list of published posts and read each post individually
Background:
Given there are posts
| post_title | post_content | post_status | post_author |
| Just my article | The content of my article | publish | 1 |
| My draft | This is just a draft | draft | 1 |
Scenario: List my blog posts
Given I am on the homepage
Then I should see "Just my article"
And I should not see "My draft"
Scenario: Read a blog post
Given I am on the homepage
When I follow "Just my article"
Then I should see "The content of my article"
Take these features written in Gherkin and try to execute the scenarios as tests
Common steps can be written in reusable context classes
