EMBARCADERO TECHNOLOGIESEMBARCADERO TECHNOLOGIES
Behavior Driven DevelopmentRoman [email protected]://roman.yankovsky.me/http://plus.google.com/+RomanYankovsky/
12th August, 2014Download a free trial – NOW!http://embt.co/trialdownloads
EMBARCADERO TECHNOLOGIES
This Skill Sprint Works with . . .
• Windows• OS X• Android• iOS• RAD Studio• Appmethod• Object Pascal• C++
• RAD Studio XE6 DocWiki– http://embt.co/raddocwiki– http://docwiki.embarcadero.com/RADStudio/XE6/en/
• Appmethod 1.14 DocWiki– http://embt.co/appmethoddocwiki – http://docwiki.appmethod.com/appmethod/1.14/topics/en/
• Appmethod supports the FireMonkey framework on all 4 platforms while RAD Studio, Delphi and C++Builder also support VCL on Windows. Contact sales with any questions!
EMBARCADERO TECHNOLOGIES
Communication is the Key
Customer := TCustomer.Create;
…
We would like to encourage new users to buy in your shop. Therefore we offer
10% discount for their first order.
1. Register a user2. Order a book3. Verify price
Product Owner Software Engineer QA
EMBARCADERO TECHNOLOGIES
Shared Understanding
Product Owner Software Engineer QA
Given the user has not ordered yetWhen the user adds a book with the price of EUR 10 into his shopping cartThen the shopping cart sub-total is EUR 9
EMBARCADERO TECHNOLOGIES
Behavior Driven DevelopmentGherkinBusiness Readable, Domain Specific Language that lets you describe software’s behaviour without detailing how that behaviour is implemented.https://github.com/cucumber/cucumber/wiki/Gherkin
I do think that the greatest potential benefit of DSLs comes when business people participate directly in the writing of the DSL code. The sweet spot, however is in making DSLs business-readable rather than business-writeable. If business people are able to look at the DSL code and understand it, then we can build a deep and rich communication channel between software development and the underlying domain.
© Martin Fowler
EMBARCADERO TECHNOLOGIES
User Story in BDD
In order to …As a …I want …
EMBARCADERO TECHNOLOGIES
User Story in BDD
In order to avoid silly mistakesAs a math idiotI want to be told the sum of two numbers
EMBARCADERO TECHNOLOGIES
User Story in BDD
Context
Event
Outcome
Scenario:
EMBARCADERO TECHNOLOGIES
User Story in BDD
Context
Event
Outcome
Scenario:GIVEN
EMBARCADERO TECHNOLOGIES
User Story in BDD
Context
Event
Outcome
Scenario:GIVEN
WHEN
EMBARCADERO TECHNOLOGIES
User Story in BDD
Context
Event
Outcome
Scenario:GIVEN
WHEN
THEN
EMBARCADERO TECHNOLOGIES
User Story in BDD
Feature: Calculator In order to avoid silly mistakes As a math idiot I want to be told the sum and the multiplication of two numbers
Scenario: Add two numbers Given I have entered 50 in calculator And I have entered 50 in calculator When I press Add Then the result should be 100 on the screen
EMBARCADERO TECHNOLOGIES
DEMONSTRATIONDelphiSpec
EMBARCADERO TECHNOLOGIES
Resources
• DelphiSpec– https://github.com/RomanYankovsky/DelphiSpec
• Samples– https://github.com/RomanYankovsky/DelphiSpec/tree/master/Demo
• Gherkin– https://github.com/cucumber/cucumber/wiki/Gherkin
• Blog Posts– http://roman.yankovsky.me/?p=1299– http://roman.yankovsky.me/?p=1458– http://roman.yankovsky.me/?p=1648
Download a free trial – NOW!http://embt.co/trialdownloads
EMBARCADERO TECHNOLOGIESEMBARCADERO TECHNOLOGIES
Q & A
Download your free trial now! http://embt.co/trialdownloads
@EmbarcaderoTech