DEVELOPING SOFTWARE WITH BEHAVIORS

DEVELOPING SOFTWARE WITH BEHAVIORS

Customer expectations, often, get lost in translation when they are handed off from product marketing, to development, quality assurance and finally to the operations team for delivery.

How do you define a common vocabulary for all stakeholders? How do you measure progress? And how do you know you have met customer expectations?

Behavior Driven Development (BDD), an agile software development process, can help! Here is how...

STEP 0: USER STORY

Customer expectations are captured in a user story.

“As a [role]
I want [feature]
So that [benefit]”

STEP 1: DEFINE CONTEXT

A context is defined using a "feature" as described below.

 

A feature includes:

  • the user story we defined in Step 0
  • scenarios or behaviors that are used to explain the use cases

 

In addition, for each scenario or behavior:

  • preconditions are defined using the keyword "Given"
  • an event trigger is defined using the keyword "When"
  • an expected outcome or a verification is defined using the keyword "Then"

 

STEP 2: EVALUATE FOR CORRECTNESS

No we did not skip the "Develop Solution" step! Instead of waiting for tests to be implemented, we want instant feedback!

Similar to Test-driven Development (TDD), all our tests will initially fail. As developers commit the solution, our scenarios or behaviors will start passing.

All BDD frameworks include standard automated reporting structure such as JUnit, which can be integrated in Jenkins or other Continuous Integration Software tools.  Hence, you don't have to track test case definitions and results in spreadsheets or test case repository systems.

 

STEP 3: DEVELOP SOLUTION

You will first develop the underlying code for the new feature. Then "steps" are added to translate the behaviors to your code. 

It is possible for you to miss or misinterpret a requirement, in which case, you will have to modify the behavior, steps and code accordingly. 

The process continues until all tests pass and all requirements are adequately satisfied. A software release decision can be made at this point.

 

STEP 4: DEPLOY & MONITOR

After your new software features have been deployed, feedback from operations and customers will be used to adjust your requirements and scenarios in subsequent releases.

 

RECAP

Behavior Driven Development(BDD), provides

  • a common vocabulary for product owner, developers, quality assurance and operations team
  • a complete feedback loop on overall feature progress (i.e. all tests initially fail then they start passing)
  • automated reporting system (i.e. no need to invest into a test case repository system)

 

Common BDD frameworks are

  • Behave for Python with several reporting plugins like JUnit
  • Cucumber for Java, Ruby, Groovy and even Tcl!

 

BDD may be challenging to implement if your organization is not agile, large, located in multiple geographies, or does not follow the git flow process.

The Behave Examples and Tutorials is an excellent starting point for learning everything about BDD!  

To view or add a comment, sign in

More articles by Zile Rehman

  • The Flash Storage Revolution (Megabytes to Terabytes)

    In 1985, $1 bought you 70KB of storage. Today, it buys you over 20GB.

  • PARALLEL COMPUTING 101

    Parallel computing is based on the principle that large problems can be divided into smaller ones and are then solved…

  • SAME OLD THINKING, SAME OLD RESULTS!

    Delivering software applications rapidly requires agile tools and methodologies. However, organizations with same "old"…

  • ART OF DELEGATION

    Delegating or empowering others seems like the most obvious thing to do. But can be quite challenging.

    1 Comment
  • BUILDING A PYTHON APP

    Building a python app can be a tedious process. Before we dive into it, let's first understand the anatomy of building…

  • PROCEDURE FOR A SUCCESSFUL SOFTWARE DEPLOYMENT

    Software deployments can be tricky. How do you plan one? What do you do when you run into surprises? What defines a…

  • OVERCOMING THE YAML CLUTTER

    YAML is great for defining seed data for your application. As your data grows, however, it can turn into an…

Others also viewed

Explore content categories