Questions tagged [bdd]

BDD stands for Behavior Driven Development. It is related to, and derived from, TDD (Test Driven Development) and ATDD (Acceptance Test Driven Development). It differs from them in its language, preferring "example", "scenario" or "specification" to "test".

BDD stands for Behavior Driven Development.

It is related to, and derived from, TDD (Test Driven Development) and ATDD (Acceptance Test Driven Development). It differs from them in its language, preferring "example", "scenario" or "specification" to "test".

Unlike TDD, BDD is not focused on functionality but on behavior.

It improves communication between team members and it bridges the gap between non-technical and technical people working on the same project by using a common language. Whereas TDD focuses on "how" to implement the functionality, BDD explains "what" functionality to implement.

BDD is an Agile software development process...

...that encourages collaboration between developers, QA and business participants in a software project.

BDD is also known as...

... (Specification by Example) or (Acceptance Test Driven Development). It is derived from (Test Driven Development). It differs from them in its language, preferring example, scenario or specification to test. The language is intended to encourage questioning and conversation around the scenario or example, as BDD works from an assumption that we don't know enough to write an accurate test in the first place.

Scenario-based BDD tools use a Given / When / Then format to capture and automate the conversations. TDD and mocking tools are commonly used at a class level.

Tag questions about binary decision diagrams with . Tag questions about Microsoft's Business Desktop Deployment, now Microsoft Deployment Toolkit, with .

3390 questions
22
votes
2 answers

How to integrate behave into pytest?

I create a Django app and heavily rely on pytest to discover and organize my unit and functional tests. However, I want to apply Behaviour Driven with behave Development for future tests. Unfortunately, the behave test features are not auto-detected…
Jon
  • 11,356
  • 5
  • 40
  • 74
22
votes
4 answers

passing command line argument to python-behave

I am using python-behave for BDD testing, I have to pass an URL (e.g. www.abc.com) from command line. $behave -u "www.abc.com" To achieve this, I have read behave documentation but there are not enough materials as well as explanations given for…
user3375505
  • 251
  • 1
  • 3
  • 7
22
votes
6 answers

Are there any good open source BDD tools for C/C++?

I love the Ruby RSpec BDD development style. Are there any good tools for doing this with C/C++?
srboisvert
  • 12,679
  • 15
  • 63
  • 87
21
votes
5 answers

How to write a test which loops through a range of values using RSpec?

I have a very simple Ruby implementation of a game called "FizzBuzz" (i.e. given an input number, it returns "Fizz" if the number is multiple of 3, "Buzz" if multiple of 5, "FizzBuzz" if multiple of both and the original number if it doesn't fit any…
Albz
  • 1,982
  • 2
  • 21
  • 33
21
votes
5 answers

ATDD versus BDD and the proper use of a framework

I am just getting into the concept of BDD and have listened to Scott Bellware's talk with the Herding Code guys. I have been playing around with SpecFlow some and like it pretty well. I understand the distinction between ATDD and TDD as described…
Brian McCord
  • 4,943
  • 7
  • 32
  • 44
21
votes
4 answers

Dynamic data in Cucumber tables

I have a Cucumber table, one of the fields is a date which I would like to have populated with todays date. Is there a way of doing this without having to hard code todays date into the table? Basically I would like to enter…
KJF
  • 2,083
  • 4
  • 21
  • 38
21
votes
8 answers

Is it good practice to do unit test coverage for even plain classes

Here is an example of an class with no behaviour at all. So the question is should I be doing unit test coverage for it, as I see it as unnecessary for it does have any behaviour in it. public class Employee { public int Id { get; set; } …
HatSoft
  • 11,077
  • 3
  • 28
  • 43
20
votes
3 answers

Mocha and ZombieJS

I'm starting a nodejs project and would like to do BDD with Mocha and Zombiejs. Unfortunately I'm new to just about every buzzword in that sentence. I can get Mocha and Zombiejs running tests fine, but I can't seem to integrate the two - is it…
Joel
  • 2,217
  • 5
  • 34
  • 45
20
votes
1 answer

What's the advantage of using Sinon.js over Jasmine's built in Spys?

I'm piecing together a jsTestDriver/Jasmine environment for testing our front end code and I'm seeing a lot of references to Sinon.js for stand-alone (or drop in) spies. Could someone describe what Sinon.js brings to the table that Jasmine doesn't…
jpgrace
  • 401
  • 4
  • 9
20
votes
4 answers

How do I test error conditions in HTML5 pages with cucumber?

I am testing web application behavior with Cucumber (using Selenium and Watir under the hood). My web app has HTML5 pages and makes use of the new "required" attribute. If I have a data entry form with a required field, and I submit that form with…
Aaron Brown
  • 249
  • 1
  • 6
19
votes
6 answers

Is it possible to use DDD and BDD together?

I like the middle-out development that is achieved with DDD. Development is driven by domain, the most solid part of application. We don't depend on infrastructure, persistence and presentation. That sounds good. But it has no business value. Here…
Sergey Berezovskiy
  • 232,247
  • 41
  • 429
  • 459
19
votes
3 answers

What is the Path to Learn BDD on Ruby On Rails?

I want to start BDD on Ruby On Rails what should I learn? I don't know anything about BDD, RSpec or Cucumber. What is the best way to learn? Tutorials? Something that cover things like 'What behavior I should test?' etc. thanks!
Guilherme
  • 1,126
  • 9
  • 17
19
votes
3 answers

Why Jasmine is called a "BDD" testing framework even if no "Given/When/Then" supported?

In the introduction of Jasmine, it says: Jasmine is a behavior-driven development framework for testing JavaScript code. I read several articles of BDD, and seems we should use 'Given/When/Then' to define "Scenario"s, which is what "cucumber"…
Freewind
  • 193,756
  • 157
  • 432
  • 708
19
votes
5 answers

How to input null-value into specflow step definition table

How can I input a null value in Specflow through a table? Let's look at an overly simplistic example: When a tire is attached to a car | CarId | TireModel | FabricationDate | Batch | | 1 | Nokian Hakka R | 2015-09-1 | | The…
Tuukka Haapaniemi
  • 1,156
  • 1
  • 11
  • 24
19
votes
3 answers

jasmine.js expect() does not work inside an asynchronous callback

I'm getting acquainted with Jasmine (http://pivotal.github.com/jasmine/) and found something rather baffling: it("should be able to send a Ghost Request", function() { var api = fm.api_wrapper; api.sendGhostRequest(function(response) { …
Val Redchenko
  • 580
  • 1
  • 8
  • 20