optanium
Behavior Driven Development in Testing – A Practitioner’s Point of View
  • Blog
  • Technology
  • 450 Views

Behavior Driven Development in Testing – A Practitioner’s Point of View

Ashwini Dhanakshirur

Over the span of seven years, Opteamix has successfully deployed software built on the concept of Behaviour Driven Development (BDD) to clients across varying industries. However, in the past few months, our Agile practitioners and Digital Transformation leaders at Opteamix have been engaging in conversations centered on the potential applicability of Behavioral Driven Development (BDD) practice to enhance Software Development.

As an Agile Practitioner, with a deep focus on software development and testing, this discussion inspired me to pen a few thoughts on BDD and the value proposition of BDD in software testing.

What is Behavior Driven Development?

Behavioral Driven Development (BDD) is a software development methodology which is an extension of Test-Driven Development (TDD), wherein emphasis is laid on developing features based on a user story and only then writing code that aims to provide a viable solution to real problems. When it comes to testing, the functionality of the features and the initial behaviors it is being built for is taken into consideration before delving headfirst into development.

In following such a concept, testers, business analysts and business users form an integral part of the Software Development Life Cycle (SDLC). Not only do testers have to make sure the code works, but they also must consider the problems that it’s solving. The onus lies on them to make sure that the user stories and behaviors are communicated from the business side to the technical delivery.

In a nutshell, Behavior Driven Development places heavy emphasis on team collaboration and cross-functional workflows, giving the entire team a customer-centric mindset, which ultimately leads to a clear definition of what a consumer would expect from the application.

Behavior Driven Development – The essential component in Incremental Delivery

Incremental delivery ensures that the client sees business value in the product being developed, and BDD is the key to envisioning the product as the end-user – resulting in a Minimal Viable Product (MVP) or a Minimal Marketable Product (MMP). Through incremental delivery, the client is also given enough opportunity to reprioritize features in accordance with evolving business requirements therefore, staying abreast with the world of technology.

The only problem here is, with each new enhancement to the software, there is a chance that the overall quality might begin to suffer. To ensure seamless incremental delivery, it is necessary to find a way to make enhancements and at the same time ensure that the existing functionality remains intact. At Opteamix, we’ve found a solution – Test Automation

Test Automation coupled with BDD encourages a shift from thinking in terms of ‘tests’ to ‘system behavior’ and uses human-readable descriptions of user requirements as the basis for software tests. Let’s have a look at the process and the various roles involved in developing a test case:

  • Business Users: Provides the requirements.
  • Business Analyst: Converts the requirements into human-readable Domain-Specific Language (DSL) in feature files.
  • Automation Engineer: Converts the feature files into actions.
  • Manual Tester: Reviews and updates the feature files for more coverage & studies the execution reports.

The Opteamix BDD Test Automation framework involves a number of stakeholders that ensures the quality of testing every step of the way. Because of this process flow, the automation engineer can quickly develop the automation scripts for Web application testing without worrying about the underlying Selenium details and the configurations.

Let’s investigate the framework in detail:

The Core framework is developed in Groovy to process the feature files, interpret the commands, process the test data, and generate the report. Selenium and Winium are implemented for Web and Windows testing.

Some of the salient features of the framework:

  • Groovy/ Java for customization for business validations.
  • Cucumber for extensive reporting along with screenshots.
  • DSL for writing feature files in a human-readable format.
  • Integration with Selenium Grid for parallel execution.
  • Control the execution of the feature files in parallel/ serialized batches through configurations.
  • Group execution – allows multiple profiles to be maintained for various environments including sanity and smoke testing.
  • Database validation – Oracle/ SQL data validation.
  • Platform independent – Can be run in Windows/ Linux/ Mac machines.
  • Cross-Browser testing – Configurable to test the use case in different browsers.
  • Take snapshots of each step and incorporate screenshots in the cucumber reports.
  • Seamless Integration with Jenkins CI/ CP.
  • Functional Library with keywords to handle any scenario on the web application.
  • Integration with Docker which allows the out of box usage of the framework without the need to install the hub/ nodes.
  • API testing.

Behavior Driven Development in action

Case Study – Test Automation Implementation for a US-based Bank

Opteamix provided a test automation solution for a US-based Wholesale Mortgage whose testing process for over 1,000 manual test cases was rapidly becoming very challenging to maintain and execute due to limited technical capability. Opteamix conducted a discovery phase and laid out a plan of action that included a high-level Test Automation roadmap which provided visibility on the approach, implementation plan and financials to solve the business challenges that included test processing time, high costs and erratic quality metrics.

Based on the solution identified as part of the roadmap, Opteamix implemented a Behavior Driven Development (BDD) – based Test Automation framework that helped the bank automate around 90% of the test cases. This resulted in the testing cycle reducing from a 4-person team that worked for 3 days to complete the testing cycle, to 1 person who took 8 hours (unattended) to execute the tests.

As you can see, BDD has contributed largely to our success rate as testing partners for our clients.

Talk to us for a Free Assessment

Related Articles

Freshest Articles

May 24th, 2020

An Eventful Odyssey

by Felix D' SouzaRead more

May 24th, 2020

Working Together Towards Success – People Practices to Aid Remote Working

by Shalu PriyaRead more

May 13th, 2020

Let’s Adapt, Let’s Improvise, Let’s Automate – Robotic Process Automation For Banks and Credit Unions

by OpteamixRead more

Engage Deeper

Opteamix is a US-based global technology firm delivering crafted technology solutions and services that enable industries to reach their full potential. Since our inception in 2012, we have focused on positioning ourselves as trusted technology partners and digital enablers, recognizing the need and complexity involved in using technology to create digital disruption.