8 Best Behavior Driven Development (BDD) Tools and Testing Frameworks

Review of the top Behavior Driven Development BDD Tools and frameworks:

In this article, we are going to discuss the Behavior driven development and some of the related tools used in it. We will discuss some of the best tools present in the industry today on this topic.

So, before going into tools, what is behavior driven development? This is a development method which has evolved from the Test-driven development process. Behavior Driven development is mostly about technical insight and business knowledge.

In most of the cases, this is achieved with the use of domain specific language. Domain specific language uses natural English language constructs to define the outcomes from the said behavior.

Behavior Driven Development Tools

Wouldn’t it be easier to explain BDD with the help of examples? Yes! Let’s see how a User story is written in BDD. A typical user story has a title or a story, a narrative and scenarios in it.

Title: To maintain 20 iPhone 7 models in my inventory

I am a Cell Phone Store Owner

In order to address fresh orders

I need to maintain 20 iPhone 7 models in my inventory

Scenario1:

Given that a customer has purchased an iPhone 7

Then my Inventory balance should go down to 19

When I transfer one model from the Warehouse to Inventory

Then the inventory balance should go up by 1, to 20

Scenario2:

Given that a customer has purchased an iPhone 7

Then my Inventory balance should go down to 19

And the customer has decided to return the model

Then the inventory balance should go back to 20

With these data and the knowledge on Behavior-driven development, we shall get into the review of our handpicked tools which support BDD.

***************

=>> Let us know if you want to add any other tool in the list.

**************

Best BDD Tools and Testing Frameworks

Here we go!

#1) Cucumber

Cucumber Logo

  • First point and the most important is the price. And, yes! It is free to use
  • Cucumber helps in writing the tests which are easy to understand by anyone irrespective of the Technical knowledge they possess
  • The stakeholders, Business Owners, Testers and Developers work on the problem statement to derive the best behavior set
  • The behavior sets are then changed into Acceptance Test conditions using Cucumber
  • Cucumber as a tool maintains both the requirement statement and the Test conditions in the same place
  • The tracking of the implementation is easy using Cucumber. The behavior set that is implemented and working are displayed as working in Cucumber. The ones those are not are displayed accordingly
  • Cucumber typically uses Ruby as the programming language. However, other languages such as JAVA, Groovy etc. can also be used
  • Both the Testing team and development team are involved in writing/developing test conditions
  • Just like Selenium, Cucumber is restricted only for Web-based automation
  • To use Cucumber, things such as Cucumber, IDE, Ansicon, Watir, RSpec should be installed. We have already discussed that Cucumber uses Ruby as the programming language. Ruby and Ruby development Kit should also be installed.

Further details on Cucumber can be found from here

=> Want to learn more about Cucumber then you can check here

#2) Easy B

EasyB Logo

  • EasyB is a framework which uses stories as the verification units
  • EasyB is mostly written with Groovy and is compatible to work with Java or Groovy languages
  • EasyB can be used to generate user stories, declare the specifications etc.
  • As EasyB uses Groovy script, the specifications can be written more in English rather than in Programmer-centric statements. This makes EasyB satisfy the BDD model
  • Once a specification is entered, it is called as a Pending specification. They are added to a system once implemented in the system.
  • EasyB comes in handy in Unit testing, if developers opt to go for it
  • This also supports JDBC connection and comes handy with external plug-ins [JAR files]as well which expands the operation
  • There is no IDE integration for EasyB
  • EasyB also provides a reporting tool which comes in handy to get the data in the form of XML and HTML.

For more details check here

#3) JDave

JDave Logo

  • JDave is a Behavior driven development framework.
  • JDave runs on top of JUnit and that means, it can run easily in the Eclipse.
  • This integrates with JMOCK2 and Hamcrest as the Mocking framework and the matching library respectively.
  • JDave is a specification engine and each scenario shows the behavior of a class unlike a story runner framework like Cucumber.
  • JDave is quite easy to learn and the specifications were written are complete in its own way.
  • However, when BDD is taken into account, JDave becomes a slightly more developer oriented framework.

More details on JDave can be found from here


#4) Concordion

Concordion Logo

  • This is one of the most powerful tools to write acceptance test automation scripts in JAVA based projects.
  • Concordion integrates with the JUnit framework and hence can be used with usual JAVA IDEs such as Eclipse, Netbeans etc.
  • Concordion too helps in writing specifications. But, here the specifications are written in HTML.
  • The acceptance tests are written in fixture code which is nothing but JAVA language.
  • Concordion provides external APIs to enhance the functionalities. Some of the examples are Excel support. With this, the specifications can be written in the excel sheets and can be used from there. Similar way, there are APIs to support capturing logs, takings screenshots etc.
  • As the specifications are written in HTML, specification documents can be hyperlinked to the HTML.
  • Concordion is pure JAVA based framework which has some really nice looking report generations support.
  • However, this doesn’t have support for TestNG and the business analyst needs to have knowledge of HTML to write specifications.

Further details on Concordion can be found from here

#5) JBehave

Jbehave Logo

  • Jbehave is a Behavior driven development tool for JAVA. This is an Open source framework created by Dan North in the year 2003.
  • This has two components namely Jbehave Web and Jbehave Main
  • This is a pure Java based implementation and has IDE support
  • Stories are text based in this tool
  • This has a reporting feature and the reports can be generated in XML, HTML or in Text mode
  • Jbehave can integrate to Selenium easily for running test scripts on Web applications
  • Because it is a JAVA based framework, this can be run on IDEs such as Eclipse, Netbeans etc.

More details on Jbehave can be found from here

#6) Fitnesse

Fitnesse Logo

  • Fitnesse is an Open source automation framework based on Framework for Integrated Test [FIT] by Ward Cunningham
  • Fitnesse helps in automating acceptance testing while integrating on a Business level
  • This is written in JAVA and is bundled as a JAR file. The executable JAR file comprises of elements such as a Web server, testing engines [FIT or SLIM], wiki engine etc.
  • FIT and SLIM are two test systems those are part of Fitnesse. FIT is the older sibling and obsolete now. There is no further development happening related to FIT. SLIM, on the other hand, is the lightweight version of the FIT test system.

More details on Fitnesse can be found from here

#7) BeanSpec

  • BeanSpec is a simple tool which handles complex of the specifications in it
  • This is written in Java and hence can be handled from IDEs like Eclipse and Netbeans
  • This has its own internal report and can be generated at the end of execution.

Further details can be found from here

#8) SpecFlow

SpecFlow Logo

  • This is called as Cucumber for.NET. Specflow is similar to Cucumber in so many aspects. In fact, this was developed by getting inspiration from the Cucumber
  • Specflow uses Gherkin formatted English text to describe user stories
  • Because it is.Net based, SpecFlow integrates with Visual Studio. However, Specflow can also be used from the Command line
  • To run Specflow on the system, two things are necessary one is IDE Integration and another one is Visual Studio
  • Specflow is an Open source and even though it is inspired from the Cucumber, it has some advantages over Cucumber. With Visual Studio coming into the picture, a user gets hands on the VS Debugger which is useful in terms of adding breakpoints on Given/When/Then lines in the statements.
  • Some of us really prefer Visual Studio over the Eclipse. Not because of the usability, but because of the name. As simple as that! And so on.
  • Specflow + Runner helps in generating reports for the test runs
  • Specflow + Runner also bring some of the cutting edge features into Specflow such as Auto-deployment configuration, Parallel execution of tests, intelligent execution where the failed tests are executed first etc.

Further details on Specflow can be found from here

So, these are few of the top Behavior driven development tools that we thought are best in the market. Feel free if you have used anything other than the ones mentioned above. And, which one do you prefer?

********

=>> Let us know if you want to add any other tool in the list.

********