Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Alexander Litvinok (software engineer) "bdd wtf"


Published on

  • Be the first to comment

  • Be the first to like this

Alexander Litvinok (software engineer) "bdd wtf"

  1. 1. Alex LitvinokBDD: WTF? @# Have you ever heard of BDD/Gherkin/etc.? true is near.. © 1993-2012. EPAM Systems. All Rights Reserved.
  2. 2. Behavior Driven Development .. this is just behavioral specifications.
  3. 3. TDDDDD Automation Testing BDD
  4. 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"
  5. 5. This is Gherkin..
  6. 6. Just..Given/ When/ And / Then
  7. 7. Implementation. Cucumber
  8. 8. Given /^I signed up as owner$/ do pendingend– Ruby
  9. 9. Scenario Step Definition Domain Classes Integration Scripting
  10. 10. Scenarios should be: Easy to understand Consistent Easy to access
  11. 11. Experience
  12. 12. TaskCheck possibility of read/write for MySQL in the PHP
  13. 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. 14. Weve got the following steps:1. connection to MySQL2. database and a table is selected3. some data is inserted4. some data is read
  15. 15. …/** * @Given /^ connection to MySQL$/ */ public function connect() { $this -> conn = mysql_connect(); if ( ! $this -> conn ) { throw new Exception(); } } …
  16. 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.