This page contains a Flash digital edition of a book.
28 | Testing communication
Explaining the terms:
Behaviour-Driven Development
Behaviour-Driven Development (or BDD) is an agile software development technique that seeks to encourage
collaboration between software developers, QA and the management or business participants in a software
project. Originally conceived in 2003 it was a response to Test Driven Development (TDD). The language and
interactions used in the process of software development are the focus of BDD. Behaviour-driven developers
use their native language in combination with the language of Domain Driven Design to describe the purpose
and benefit of their code, this allows the developers to focus on why the code should be created, rather than
the technical details, and minimises translation between the technical language in which the code is written
and the domain language spoken by the business, users, stakeholders, project management etc.
Test-Driven Development
Test-driven development (TDD) is a software development technique that uses short development iterations
based on pre-written test cases that define desired improvements or new functions. Each iteration produces
code necessary to pass that iteration's tests. Finally, the programmer or team refactors the code to
accommodate changes. A key TDD concept is that preparing tests before coding facilitates rapid feedback
changes. Note that test-driven development is a software design method, not merely a method of testing.
Domain-Driven Design
Domain-driven design (DDD) is an approach to the design of software, based on the two premises; firstly
that complex domain designs should be based on a model, and secondly that, for most software projects, the
primary focus should be on the domain and domain logic (as opposed to being the particular technology used '0$64
to implement the system). The term was coined by Eric Evans in his book of the same title.
0/:063
Cucumber scenarios we use the language of which allow us to express data sets
Cucumber is a tool, written in Given/When/Then to describe the to be used in different runs of a
the Ruby programming language, behaviour. scenario. These Scenario tables were
*/%6453:
which takes plain text feature Given – are used to set-up the state inspired from FIT (Framework for
documentation and makes them When – to perform some action Integrated Test) tables. These are
executable as tests. It can be used to and seen in frameworks such as Fitnesse.
‘test’ code written in Ruby or other Then – to test the expected These tables allow the customer
languages with the help of some outcomes. to communicate the expected
extra tools: output to us through concrete
"POFEBZFWFOUGPSTFOJPSMFWFMQSPGFTTJPOBMTUPEJTDVTT

JRuby and Java In Cucumber we break from using the data examples that exemplify the
EFCBUF
BOESFTPMWFUIFJSNPTUQSFTTJOHDIBMMFOHFTUISPVHI
IronRuby and .NET typical convention seen in function of the system. This
FunFX and Flex User Stories: helps us to flush out incorrectly
BTFSJFTPGQSFBSSBOHFE 'PDVT(SPVQT
As a [stakeholder] I want [feature] assumed rules and to discover real
Cucumber feature example so that [goal] business rules.
Feature: Search courses Instead we use a convention which
In order to ensure better utilisation comes from Feature Injection. Example:
of courses In order to [goal] [stakeholder] Feature: Stock keeping
Potential students should be able wants [behaviour] In order to avoid interruption of sales
to search for courses As a jeweller I want to know how
UI4FQUFNCFS
Scenario: Search by topic While it may seem a small change, it many rubies I have left
Given there are 240 courses where can help drive out the value, or lack Scenario Outline: Selling
1BSL*OO)PUFM
)FBUISPX
none have the topic ‘biology’ of it, from a feature. A great example Given there are <start> rubies
And there are 3 courses A, B, C of this is when you have to enter your When I sell <sell> rubies
that each have "biology" as one of email address twice when registering Then I should have <left> rubies
s$EBATE3ESSIONS
the topics on a typical web page.
When I search for ‘biology’ As a user, I want to fill in my email Examples: s0EER4O0EER.ETWORKING
Then I should see the following twice, so that... wait, I don’t want to | start | sell | left |
courses: waste my time doing that. | 12 | 5 | 7 |
s$ISCUSS)NDUSTRY7IDE)SSUES
| title | | 20 | 5 | 15 |
| A | Switching to the Feature Injection
s-INI%XHIBITION 'PSNPSFJOGPSNBUJPO
| B | style we get: Closing the gap
s&REE!TTENDANCE

$POUBDU(SBOU'BSSFMMPO  

| C | In order to avoid lots of registered While there are no Silver bullets by
These are similar to User Stories but users unable to access their accounts, using tools like Cucumber, getting
s+EYNOTE3PEAKER
&NBJM HSBOUGBSSFMM!NFEJBDPVL
we refer to them as Features. The users will need to fill in their email developers, designers, testers,
4ELEPHONE  
 &ACSIMILE  
very first part of our feature is our address twice. business and the customer using the
sA-JNJUFE1MBDFT"WBJMBCMF %MAIL JOGP!WJUBMGPDVTHSPVQTDPN 7EBSITE XXXWJUBMGPDVTHSPVQTDPN
narrative. This represents the business right words, we can help close the
Joseph Wilk
Software Architect
value of this feature. A scenario Requirements through gap between the software that was
eShopworks
represents a description of some real-world data examples written and the software the user

4HE6IT!,&OCUS'ROUPSAREOPENTOALLINDIVIDUALSWITHINTHE)4INDUSTRYALTHOUGHEIGHTYCOMPLIMENTARYPLACESAREOFFEREDTO-ANAGERS (EADS $IRECTORS AND#)/S ONAFIRSTCOMEFIRSTSERVEDBASIS4ERMSAND#ONDITIONSAPPLY
www.eshopworks.co.uk
behaviour of the system. Within the Cucumber introduces scenario tables actually wanted.
T.E.S.T | March 09 !NEVENTORGANISEDBY-EDIAPUBLISHERSOF6IT!,-AGAZINE
VitAL Focus Group Ad FP 1108.indd 1 17/10/08 15:25:18
Page 1  |  Page 2  |  Page 3  |  Page 4  |  Page 5  |  Page 6  |  Page 7  |  Page 8  |  Page 9  |  Page 10  |  Page 11  |  Page 12  |  Page 13  |  Page 14  |  Page 15  |  Page 16  |  Page 17  |  Page 18  |  Page 19  |  Page 20  |  Page 21  |  Page 22  |  Page 23  |  Page 24  |  Page 25  |  Page 26  |  Page 27  |  Page 28  |  Page 29  |  Page 30  |  Page 31  |  Page 32  |  Page 33  |  Page 34  |  Page 35  |  Page 36  |  Page 37  |  Page 38  |  Page 39  |  Page 40  |  Page 41  |  Page 42  |  Page 43  |  Page 44  |  Page 45  |  Page 46  |  Page 47  |  Page 48  |  Page 49  |  Page 50  |  Page 51  |  Page 52
Produced with Yudu - www.yudu.com