Breaking Barriers with Continuous Automation in BDD
Sundar Radhakrishnan
GTM/ Profitable Growth / Consulting led Tech Sales /Customer Success
It goes without saying, anything that’s not automated in this day and age is highly unlikely to take off. Simply because, today’s digitally-empowered customers would rather have nothing to do with your product or service, if it fails to get them what they want, right at the moment they want it. At Cognizant we call it the need for quality at speed. To assure your products and services successfully deliver quality at speed to your customers, you need automation.
This brings me to the point of this blog. As explained earlier, Behavior-Driven Development or BDD is a development methodology that aligns your software with the expected behavior of the end user. Fair to say, embedding automation in the way you do BDD will not only accelerate releases, but also help you ensure the right quality is delivered, on time.
Breakthrough in Automation with BDD
Automation in BDD has greater return on investment, than automation in traditional development approaches. Typically, the latter is a sequential process, where the business provide requirements and SMEs or Analysts convert those into user stories, based on which the QA team manually generates test cases to execute. Leveraging automation here would require the QA team to assess this repository of test cases, and then identify the best-suited candidates for automation. Remember here, execution of every test case cannot be automated. (Read our whitepaper, Missing the Mark: Ten Reasons Why Automation Fails Across the Software Development Lifecycle.)
Now, in a BDD environment, the syntax that the business analyst uses to write requirements is the same that the QA team uses to write test scripts. This helps drive automation more as a parallel activity. For instance, Gherkin is a language used to write BDD user stories, where the syntax goes like ‘Given, When Then’. As the business analyst pens down requirements, the same could be treated as a user story for automation to automatically generate pseudo code for testing. In this way, enterprises achieve continuous integration of testing and development activities, powered by in-sprint automation.
Figure 1: Automation Workflow: Traditional vs BDD-Gherkin Style
Hit the Bull’s Eye with Four I’s of Automation
Coming to how to automate, there are four I’s to focus on:
· Intelligent – Usage of tags, common functions to increase reusability and maintainability
· Inclusive – Automation coverage for negative and exception scenarios
· In-line - Built In sprint and available for validating new functionalities
· Integrated - Tool orchestration for CI and also feedback for detailed reporting
Cognizant built a Selenium Serenity-based BDD automation framework with continuous integration for a leading multinational bank headquartered in the USA. This helped the bank reduce cost of quality and accelerate releases, with:
· 50% Early defect detection
· 37% Improved productivity
Example of Automation Framework with the 4 Is incorporated
The Caveat
As you plan to kick-start BDD embedded with automation, here are a few caveats to consider:
· Common Understanding: Since this is BDD we are talking about, the importance of having everyone on the same page cannot be stressed enough. Have your key actors – BA, Developer & QA guys – sit together and write requirements, user stories and test scripts in a declarative language, such as Gherkin, that could be understood by even a non-technical person. Let the behavior and features of the application be explained by way of examples, so that no scope for misinterpretation further.
· Executable Gherkin and Parameterization: So now the factor most closely linked with a successful automation strategy. Ensure the input syntax for executing automated regression testing is compatible with ‘Given, When Then’ verbiage, such as Gherkin and include And, But keywords as appropriate with details on pre-conditions and data. This would help in integrating test automation with continuous development of user stories and features, ensuring highest impact automation.
· Multi level Reporting: To further leverage the power of automation, all scenarios covered during automation should be recorded for analysis of failure points. This would help teams to assess the impact that automation has had on speeding up processes with summary view , while also giving drill down for identifying areas where the elements failed.
Once all this is synthesized, it’s time to get it vetted by the operations and product teams – those who come in at the very end of the lifecycle and who can actually tell you where you might go wrong. These teams can help you identify critical failure points from a production angle and highlight exceptions, which still might potentially happen despite everything being taken care of. Heed them.
In my next blog, I explain how such collaboration enables enterprises to orchestrate quality.
Program Manager - IT Engineering
7 年Very nice and article for current trends of digital era. Thanks Sundar.
Hi Sundar, Quick and Nice read...!! Thanks for this!!
Data Engineering Leader
7 年Nice article. I am happy to be part this Quality@Speed solution we are offering to our customers in their digital transformation journey One area I would like elaborate is the Acceptance criteria. A requirement definition stage has 2 phases 1. What 2. How What Phase - In this phase a BA defines the requirement. Example: User should be able to search based on the "First Name" How Phase - In this phase, "3 Amigos"- BA, QA, Dev worksheet and talk about examples Given the system has list of names in the repository Examples: |Name List| |Ramakrishnan| |Krish Ram| |Sundara Ramakrishnan| When the user searches with FirstName as "Ram" Then display the names with Ram in the search results Examples: |SearchResult| |Ramakrishnan| |Krish Ram| |Sundara Ramakrishnan| "3 Amigos" are going to various examples for this requirement. In this phase "3 Amigos" go and provide examples or scenarios for this requirements. This could help in bringing the common understanding of the requirement among the team. This becomes the input to the developers for development and testers for automation. One of the biggest need I see delivering quality@speed is to shift quality early in the life cycle and "3-Amigos" plays a big role in it.
Senior QE Strategist | Cybersecurity Expert | Transformational Leader in Tech
7 年Excellent article Sundar Radhakrishnan