BehaviourDrivenTestsfocusesonthebehaviourratherthan the technical implementation of the
software. If you wantto emphasize
on business point of view and requirements then BDT is the way to go. BDT are
Given-when-then style tests written in natural language which are easily
understandable to non-technical individuals. Hence these tests allow business
analysts and management people to actively participate in test creation and
Why BDT originated?
Since the time test automation started, it has evolved tremendously
with new concepts, framework design and tools. The low usability, rigidity and
high maintenance cost hasbeenthereasonofevolutionofautomationframeworks.
one common disadvantage of using any of these frameworks is the difficulty in
understanding the automated test cases by the non-technical people such as
business analysts and management.
BDThashelpedtoplug-inthisgap.Ithashelpedtobridgethe communication gap by writing human
readable test cases. It isarelativelynewagilesoftwaredevelopmentapproachthat focuses on communication;
encouraging collaboration between developers, QA and business participants; to
help bridge the Business-IT alignment gap. The scenarios are written to build
up a clear understanding of the desired behavior and this happens through
discussion with stakeholders.
How is BDT implemented?
ThereisaplethoraofopensourceBDTframeworksavailable in many programming languages and supporting different
platforms. For instance, Cucumber (preferably with Ruby), JBehave for Java,
NBehave and specflow for .Net, Behat for PHP and Twist for Groovy etc. The BDT
layer is implemented on top of customized framework so it is about building up
layer upon layer only. The behavior driven tests are given- when-then style
steps written in natural language.Of
course, the implementation of these steps has to be done in a programming
language of one'schoice.
Advantages and challenges of BDT
Collaboration: It engages product teams, business analysts, QA team and developers
onto the same page and provides a platform to resolve the differences in point
of view. Thus, ensuring that all stakeholders have the same expectations. This
co- operation between stakeholders in-turn results in good and clear set of
Easy Review and Feedback: No development
skills are required for creating tests as tests are written in ubiquitous
language. Business Analysts can actively participate in automated test cases
review process and give their feedback to enhancethem.
Right Focus: BDT helps to focus on the
user's needs and the system's expected behaviour rather than focusing too much
on testing theimplementation.
Greater ROI: It has been observed that
the behavior of the software stays for longer than the implementation. So,
behavior driven tests are easier to modify and hence results in greater ROI.
Also, the BDT tools are open source which further reduces the investment.
Easy Maintenance: With BDT code
redundancy can beminimizeddueto'stepreusability'feature.Hence, these tests are less costly tomaintain.
Availability of skilled
resources: The BDT tools and frameworkdevelopmentapproacharedifferentfrom other popular automation tools in the market like QTP,
SilkTest, TestComplete. So, skilled resourcesare required to build and maintain the BDTframework.
Re-engineering: In some cases, the tests written by the manual
tester/client/ business analysts are not good enough for automation. So, some
rework may be required to make them suitable forautomation.
Support Community - The concept of BDT
is relatively new that is why the support community is yet not large enough. So
currently, it might take a littlelongertoresolvethetechnicalissuesorqueries.
BDT is gaining momentum as lot of organizations are looking at it as
a solution to their automation and collaboration challenges. BDT framework has
been successfully implemented by various QA teams in various domains.
Implementing BDT with automation best practices and integrating it with CI
& test case management tool produces all the benefits of automation. BDT
for sure is here to stay.