4. Feature: Post articles
In order to show trip photos
A owner
Should be abble to post article
Scenario: Post article by owner
Given I signed up as owner
When I write article "About myself"
And I post article
Then I should see "Article is created"
13. Feature: Check read/write for MySQL in PHP
Scenario: Check write
Given connection to MySQL
When database and a table is selected
Then some data is inserted
Scenario: Check read
Given connection to MySQL
When database and a table is selected
And some data is inserted
Then some data is read
14. We've got the following steps:
1. connection to MySQL
2. database and a table is selected
3. some data is inserted
4. some data is read
15. …
/**
* @Given /^ connection to MySQL$/
*/
public function connect()
{
$this -> conn = mysql_connect();
if ( ! $this -> conn ) {
throw new Exception();
}
}
…
16. Resume
BDD is a software development process.
It is based on the behavior specification.
Gherkin is a meta language for writing scenarious.
Cucumber is tool for testing on different languages.