Skip to main content
Posted On 08 Jul 2018

Business Driven Testing

I agree to Privacy Policy

Latest Blogs

RPA: How Easy is to Get Started?

Posted On October 18, 2021

Essential Guide To Experience Design

Posted On October 14, 2021

How to Sell Digital Transformation to your Board?

Posted On October 11, 2021

A Guide to Embedded Finance

Posted On October 07, 2021

When is the Right Time to Invest in Automation?

Posted On September 20, 2021

3 Strategies for Implementing a Microservices Architecture [+A Little More]

Posted On September 16, 2021

Non-Tech Executive’s Guide to Software Development

Posted On September 13, 2021

Why Should Business Executives Back Data Lake Investments?

Posted On September 09, 2021

Top RPA Trends In 2021

Posted On September 06, 2021

Fundamentals of Cybersecurity in Banks

Posted On September 02, 2021

In a fast paced environment, it is very important to have Continuous Delivery as the theme to deliver your releases as customers demand and also with the highest levels of quality. To get to continuous delivery continuous development and continuous testing backed by continuous integration are a first step. To achieve continuous development and testing, In this note we use Business Driven testing which is a piece of the larger methodology by Qentelli called Quality Driven Development, as the key first step. Let us now take a look at what it entails.

Meet Business Driven Testing (BDT) the way to Leverage ATDD Principles for Continuous Delivery

BDT is a component of Quality Driven Development (QDD™ by Qentelli). Behavior Driven Tests focusing on high level design not the technical implementation and not the technical terminology.

Business Driven Testing ensures test cases/stories are written in Given – When – Then style that makes it a natural language which are easily understandable to any persons like technical/non-technical.

BDT is open source framework available in many languages and it will be support different platforms: Cucumber, JBehave, NBehave, Speckflow, Behat and Twist.

We have to write the stories in the following format:

  • Given <An initial context>
  • When <Event Occurs>
  • Then <An outcome should be observed>

Involvement into BDT

Stakeholders or Users, Business Analysts, Testers, Developers will involve and perform their Respective roles.

BDT Notation:

  • Scenarios are designed to test.
  • Scenarios are grouped into features
  • Each scenario consists of   –Given   –When   – Then

Business Driven Testing Process Flow:

Business Driven Testing BDT Process Flow

Business analyst identifies the features as per the customer requirements.

  • Tester use cucumber features as test scenarios.
  • Tester writes test cases as behavior driven cucumber scenarios(user stories).
  • Developer writes code that makes test cases pass.
  • Test cases get automated by the testers.
  • Code is deployed and test executes their automated tests.
  • Bugs will get fixed, automated tests run as regression tests.
  • When done customer/user accept the software (Acceptance and quality criteria met).

Advantages and Challenges:

  • Easy understandable by the stakeholders or users because tests in the form of plain text.
  • Users and business Analysts can participate in test cases review process and give their feedback to enhancement.
  • Behaviour driven tests are easier to modify and hence.
  • Business Driven Testing tools are open source which reduces the source of investment.
  • Very easy to maintain.
  • We can implement in mobile testing.

BDT with Cucumber Framework Implementation:

If we get the business requirement or user story from the user, the user story requires to define every piece of requirement in terms of:

  • who is the primary stakeholder for a particular requirement?
  • what effect does the user wants from this requirement?
  • what business value would the user get if the aforesaid requirement is achieved.

Consider the below example to understand the above.

As a user of the Gmail, I want to find a Gmail link in Google Search Page, So that I can see the Gmail login page.

We have to write the above behaviour in feature file format (-Given -When -Then format).

  • Given describes the pre-requisites for the expectation
  • When describes the actual steps to carry on the effect of the expectation
  • Then describes the verification that the expectations were met.

Feature File: Test.feature

BDT Business Driven Testing Scinerio

Feature can contain multiple scenarios and scenarios can contain steps.

We have to follow the steps to execute and run steps with cucumber:

  1. Create a project directory: In that create 3 folders one for feature files, one for java libraries and one for step definition file as below.Create a Project Directory


  2. Copy the Test.feature file in features folder. Test.featureTest Feature BDT
  3. Get the following cucumber jar files and copy into jars folderCucumber jar Business Driven Testing BDT
  4. Now we have to compile the feature file from command line for step definition methods generation. Open command prompt and go to the project directory and give the command as: Java –cp “jars/*” cucumber.api.cli.Main –p pretty featuresCompile Feature Business Driven Testing BDT
  5. Press enter then we will get the step definition methods as follows:StepDefinition

    Copy the selected three methods and paste into file.

    Prior to that just create file as

    package step_definition; // we have to give the folder name as package




    import cucumber.api.PendingException;

    public class StepDefinition {

    // We need copy the methods generated from the commandline.


    Note: Remove the throw new PendingException(); line because we are not dealing with that.

  6. Compile the file and enter the following command from the command line then the .class file will be generated in the step_definition

               javac -cp "jars/*" step_definition/

  7. Enter the below commands and run the file for getting result.

                java -cp "jars/*;." cucumber.api.cli.Main -p pretty -g step_definition features/Test.feature

    Cucumber Api BDT Business Driven Testing

    If we want the result in json format then we have to give the command as

    java -cp "jars/*;." cucumber.api.cli.Main --plugin json -g step_definition features/Test.feature

    Note: We can see the result in so many ways for that refer with the help of

    java -cp "jars/*;." cucumber.api.cli.Main–help

    At Qentelli, we have applied these principles in complex N-Tier architecture based applications to bring Continuous Delivery to our customers. The next steps in the sequence are ensuring Continuous Testing covers Continuous Security and Performance Engineering followed by Continuous Build, Deployments and Monitoring and Feedback. To learn more about Quality Driven Development, Continuous Delivery the Qentelli Way and DevOps reach out to us.