Professional Documents
Culture Documents
3 | What is BDD?
9 | Deliberate Discovery
11 | Example Mapping
17 | Continuous Integration
19 | Living Documentation
The deliberate discovery phase brings together key In the Agile development cycle, BDD processes usu-
stakeholders to have conversations and come up ally take place when you’d normally come up with
with concrete examples. Product owners, business acceptance criteria. The process involves converting
Behavior Driven developer? How many times have you had a conver-
sion with a developer only to find that you both had Software Development is Hard
Development? different ideas after parting ways? Behavior-driven
development attempts to resolve these common
Less than one-third (30%) of software projects are
completed on time and on budget, according to the
challenges that arise during software development
Standish Group, and another one-fifth of projects
to make it a much smoother process for everyone
are canceled before completion. In other words,
involved in the organization.
only about half of software projects could actually
Let’s take a look at why software development is be considered “successful” in being both on time
so challenging, why traditional Agile methodolo- and on budget. There are many reasons that a
technical teams closer together, release software in teria—or rules that let managers know when
more frequent cycles, and adapt to evolving custom- a user story is functionally complete—varies
er needs rather than sticking to a plan. The result in quality. Often times, there’s not enough
is better software projects that more closely match information to create reliable tests for use in
expectations—resulting in fewer canceled projects. test-driven development.
it’s easy for developers to go down a different stories and acceptance criteria and transforms
path than business analysts imagined. them into a formal set of features and examples
that can be used to generate documentation,
No Overarching Test: Test-driven development can automated tests, and a living specification. In other
ensure that the technical components of an appli- words, it gets everyone on the same page and
cation function as expected, but there’s nothing ensures that there’s no miscommunication about
that ties all of these components together to ensure how the software behaves or what value it provides
that the software delivers real business value. to the business.
BDD places a heavy emphasis on concrete ex- At the very least, BDD is worth a try for almost any
amples to reduce ambiguity in user stories and software project that requires input from stake-
acceptance criteria. In addition to getting on the holders and business people. It’s a great way to
same page, these examples help uncover gaps that dramatically cut down on the waste that’s typically
nobody had considered before the functionality seen in software projects while ensuring that
is implemented. The feature files generated in the they’re delivered on time and on budget rather
BDD process also serve as living documentation than becoming a statistic. The tests that you write
for the application, showing how it’s supposed to will also be a lot more understandable and mean-
function in a human-readable fashion. ingful to everyone on the team.
Discovery inception to delivery? Now, imagine that you could using concrete examples—and assuming ignorance.
do the same project over with everything kept the For example, a user might ask: Will my reply appear
same—except your team would know everything in my Twitter feed for anyone to see? The original
user story and acceptance criteria may not have
they learned during the original project. How long
specified the answer to that question, but it would
would the second project take to complete? The dif-
clearly have a big impact on the architecture of the
ference between these two scenarios tells you that
overall application.
learning is the constraint in software development.
Rather than building software and putting it in front
Deliberate discovery is the first step in behav-
of users to get feedback, the goal of deliberate
ior-driven development: Learning as quickly as
discovery is to try and learn as much as possible
possible to remove the constraints on a project to before writing any code to minimize waste and
deliver on time and on budget. maximize productivity.
1. 2.
What is Deliberate Discovery? Who Should Be Involved?
Most software development teams are familiar with Deliberate discovery processes should involve as
user stories and acceptance criteria. For example, many different team members as you need to provide
a user story for Twitter may state that a user can insights into their specific areas of expertise. De-
reply to another user’s tweet. Acceptance criteria velopers may think of features on a very technical
help define the specifics of how that functionality level, whereas domain experts may have insights
will be implemented, such as the presence of a re- into what actual customers are looking for in terms
ply button on the first user’s profile. The problem is of functionality. All of these insights are critical
that these two tools—user stories and acceptance for reducing the uncertainty around features and
criteria—don’t explore any unknowns. ultimately meeting the software’s business goals.
|| Domain experts wrong code. testers. The goal of these meetings is to generate
At the core, the most important outcomes of these 2. Rules: The acceptance criteria for the user
meetings are concrete examples that can be turned story that contain agreed-upon constraints
into executable specifications, and ultimately, about the scope of the story, and summarize
automated tests and living documentation for the the underlying examples.
software application.
3. Examples: These are the concrete examples
Example mapping is one of the most popular strate- covering each rule. There can be more than
gies to come up with these concrete examples one example per rule to cover different
potential use cases.
during deliberate discovery meetings. In addition to
coming up with examples, the process helps uncov- 4. Questions: These are unknowns that arise
er any unknowns or uncertain assumptions. when exploring the rules and examples or
assumptions that were made in the interest
How Example Mapping Works of moving forward.
Example mapping was developed by Matt Wynne Matt suggests using a pack of four-color index cards
after he noticed that many deliberate discovery and some pens to capture these different types
meetings were long, boring, and unstructured. His of insights as the conversation unfolds, and then
goal was to introduce a simple, low-tech method arranging these index cards in a map.
that could make these meetings short and produc- The low-tech approach is designed to eliminate any
tive. The example mapping process includes four distractions and keep the team focused on having a
components: meaningful conversation.
that simulate how users would actually be using with “Acme Project”
ra as the preferred browser automation tool for use selection of automation frameworks and tools of any || Loose integration avoids integrating automa-
with Cucumber. BDD platform. By defining individual steps describing tion-related content inside of scenarios and
the actions that are performed, you can avoid the action words. The specific implementation is
Automating the Process need to go in and write any test code — or at least re- left up to the automation team to complete for
duce the amount of test code that you need to write. the test code to run.
There are many tools that automate the process of
building step definitions. These tools can speed up For example, you could define “Click on Profile” by || Tight integration defines specific class names
the development process by automating work for setting a specific target, such as “a[text=”Profile]”, that and other details to make the tests run out-of-
test engineers, while ensuring that all step defini- will look for any link with the text “Profile” on the page. the-box. That way, the testing can be complete-
tions are consistent in their design and usage. These steps can also include variables, although the ly automated.
Important Considerations
It’s important to watch out for blind spots when
converting higher level feature files into lower level
executable step definitions.
tion, deployment, and delivery, which automatically that stakeholders can be confident in deploying
ensures that any new code passes the appropriate new features without worrying about costly
Let’s take a closer look at continuous integration, || Greater Visibility: Everyone can see the proj-
how it fits into development workflows, and how to ect state in the shared code repository, which
better integrate BDD into the process. enables a better feedback cycle.
automatically deployed. mobile platforms, including iOS and Android. || Publish the results back to HipTest using the
step-by-step guide to ensure that everyone is
The workflow can be customized depending on || Jenkins: The leading open source automation
on the same page.
the needs of the organization. For example, some server with hundreds of different plugins to
teams prefer to deploy automated builds to a stag- support building, deploying, and automating
posed to do and proves that it can do it. create documentation for users that makes it
easier for them to use the application, or help
Let’s take a look at how to leverage the scenarios
troubleshoot common problems. For exam-
and executable specifications created during the
ple, Stripe’s legendary API documentation was
BDD processes discussed earlier to create a living
critical to its success.
documentation.
|| Better Workflow: Operational documentation
Why Documentation Matters helps stakeholders communicate their vision to
development teams. For example, user stories,
Documentation is instrumental in keeping stake-
acceptance criteria, design documentation, and
holders, developers, and users on the same page.
other resources provide context to the code.
While documentation may seem to counter Agile
development principles by creating more work The amount of documentation required for a
upfront, the process actually reduces the total work project is where there’s always some confusion.
by ensuring that everyone is working together more Agile development focuses on writing as little
effectively. There’s no time wasted from miscommu- documentation as possible early on, while
nications and it’s much easier for everyone to get traditional waterfall development writes all of the
up-to-speed. documentation at the onset.
they should be able to look at scenarios and see proving communication, these processes minimize
whether the step definitions have passed. If a mistakes, reduce errors, and ensure a higher quality
developer wants to know the status of a feature, product reaches users.
they should be able to run a test and see whether
HipTest makes it easy to implement and automate
it has passed.
BDD processes with minimal coding, making it
Building Living Documentation accessible to both business and technical teams.
HipTest automatically generates up-to-date doc- With its easy-to-use interface, it’s the perfect
umentation when integrated with a continuous solution for teams just starting out with BDD pro-
integration platform. Every time a BDD scenario is cesses. The many features and integrations also
added and successfully run, the scenario is au- make it perfect for established teams looking for a
tomatically added to the human-readable living more streamlined approach to implementing BDD
documentation. This documentation can be easily across their organization.