Skip to main content

Behavior-Driven Development (BDD) – An extension of Test-Driven Development (TDD)

Behavior-Driven Development (BDD) is a process or best practice for the development (and testing) of code.
Behavior-driven development is a design and testing practice that is utilized to ensure that the outcomes and the behaviors of products and services are articulated in terms of business value.  It means that we should step aside from the technical aspects of coding, development and testing and consider, in real everyday terms, what the behavior and usage aspects are of the application or product.   We will still require technical skills, insights, automation and more, but when thinking about the defining and development of a product, business and service providers can articulate in PLAIN ENGLISH exactly what they are attempting to achieve.
BDD helps design and development practitioners scope appropriate testing for a variety of test types including:
  • Unit tests: A single piece of code (usually an object or a function) is tested, isolated from other pieces
  • Integration tests: Multiple pieces are tested together, for example testing database access code against a test database
  • Acceptance tests/Functional tests: Automatic testing of the entire application, for example using a tool to automatically launch a browser
For some software developers this means a cultural shift for their approach. Today we must rethink the way we approach the design and testing of products.  Unit testing and acceptance testing criteria need to be stated in full sentences including words describing what should be achieved by the result.  This is similar to what we do when we create a user story in Agile Service Management.  We say things like “As a I need to be able to in order to .   BDD is a best practice to ensure that in the design/development stage of a product or service the service is assured to be tested at a level that will give assurance to the business and the consumer.  Testing will be allocated to ensure that the product is fit for use and fit for purpose.
BDD focuses on:
  • Where to start in the process
  • What to test and what not to test
  • How much to test in one phase
  • What to call the tests
  • How to understand why a test fails
In practice, BDD will require the use of technology to support activities in the process.  The tools, technology and automation for BDD are generally developed for specific uses in BDD projects and are highly specialized in conjunction with Test-Driven Development (TDD).
Test-Driven Development (TDD) is a software development methodology which essentially states that for each unit of software, a software developer must:
  • Define a test set for the unit first
  • Make the tests fail
  • Then implement the unit
  • Finally verify that the implementation of the unit makes the tests succeed
This definition is rather non-specific in that it allows tests in terms of high-level software requirements, low-level technical details or anything in between.
One way of looking at BDD is that it is a continued development of TDD and makes more specific choices than TDD. Therefore, with BDD testing, outcomes and value are business driven.
Learn more about DevOps and Agile

Comments

Popular posts from this blog

What is the difference between Process Owner, Process Manager and Process Practitioner?

I was recently asked to clarify the roles of the Process Owner, Process Manager and Process Practitioner and wanted to share this with you.

Roles and Responsibilities:
Process Owner – this individual is “Accountable” for the process. They are the goto person and represent this process across the entire organization. They will ensure that the process is clearly defined, designed and documented. They will ensure that the process has a set of Policies for governance.Example: The process owner for Incident management will ensure that all of the activities to Identify, Record, Categorize, Investigate, … all the way to closing the incident are defined and documented with clearly defined roles, responsibilities, handoffs, and deliverables. An example of a policy in could be… “All Incidents must be logged”. Policies are rules that govern the process. Process Owner ensures that all Process activities, (what to do), Procedures (details on how to perform the activity) and the policies (r…

How Does ITIL Help in the Management of the SDLC?

I was recently asked how ITIL helps in the management of the SDLC (Software Development Lifecycle).  Simply put... SDLC is a Lifecycle approach to produce the software or the "product".  ITIL is a Lifecycle approach that focuses on the "service".
I’ll start by reviewing both SDLC and ITIL Lifecycles and then summarize:
SDLC  -  The intent of an SDLC process is to help produce a product that is cost-efficient, effective and of high quality. Once an application is created, the SDLC maps the proper deployment of the software into the live environment. The SDLC methodology usually contains the following stages: Analysis (requirements and design), construction, testing, release and maintenance.  The focus here is on the Software.  Most organizations will use an Agile or Waterfall approach to implement the software through the Software Development Lifecycle.
ITIL  -  is a best practice for IT service management (ITSM) that focuses on aligning IT services with the needs …

Incidents when a Defect is Involved

Question: We currently track defects in a separate system than our ticket management system. With that said, my question is does anyone have suggestions and/or best practices on how to handle incidents when a defect is involved? Should the incident be closed since the defect is being worked on in another defect tracking system if it is noted in the incident ticket? I am considering creating an incident statuses of 'closed-unresolved' so the incident can still be reported on in our ticket management system but know it is being worked on/tracked in the defect system. With defects, it is possible that we may never work on them because they are very low priority and the impact is low to the user. However, in some cases a defect is being worked on. Should we create a problem ticket instead?
Thanks, René W.

Answer: René. In ITIL, the activity you are describing is handled by the Problem Management process. ITIL does not use the term “defect” but it does use the term “known error” to…