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
39
votes
7 answers

Best way to implement Repository Pattern?

I've been exploring BDD/DDD and as a consequence trying to come up with a proper implementation of the Repository pattern. So far, it's been hard to find a consensus over the best way to implement this. I've tried to boil it down to the following…
Michael Cook
  • 1,676
  • 2
  • 26
  • 47
38
votes
8 answers

Are there any non-developer tools to edit gherkin files?

Gherkin syntax files are just plain text so any editor such as notepad can be used. However, one of the more important things we are using this for is to provide tables of sample data. Without good formatting options the files become hard to…
toddles2000
  • 1,032
  • 1
  • 8
  • 16
36
votes
7 answers

What Behavior Driven Development (BDD) Tooling/Frameworks are available for the Microsoft Stack?

I am interested in Behavior Driven Development (BDD) Are there any good frameworks and/or tooling available for the .Net platform (preferably C# and ASP.Net)? And when has BDD proved most appropriate to use in real world scenarios? (auxiliary…
one.beat.consumer
  • 9,414
  • 11
  • 55
  • 98
36
votes
1 answer

Unit test and private vars

I'm writing a BDD unit test for a public method. The method changes a private property (private var) so I'd like to write an expect() and ensure it's being set correctly. Since it's private, I can't work out how access it from the unit test…
Robert Gummesson
  • 5,630
  • 2
  • 17
  • 16
36
votes
2 answers

Testing browser extensions

I'm going to write bunch of browser extensions (the same functionality for each popular browser). I hope, that some of the code will be shared, but I'm not sure about this yet. For sure some of extensions will use native API. I have not much…
ciembor
  • 7,189
  • 13
  • 59
  • 100
35
votes
2 answers

Jasmine calls.length and callCount are undefined

I'm trying to test my chrome extension with Jasmine but I'm having trouble getting calls.length and callCount to behave as expected. Both cases return undefined. I've included a sample of the code and the spec. Here's the rest of the code if it…
Dru
  • 9,632
  • 13
  • 49
  • 68
35
votes
3 answers

Fixtures in RSpec

I'm new to using RSpec for writing tests in a Rails application which uses a MySQL database. I have defined my fixtures and am loading them in my spec as follows: before(:all) do fixtures :student end Does this declaration save the data defined…
Kris
  • 1,403
  • 3
  • 17
  • 26
34
votes
3 answers

PHPUnit & Behat; complementing or alternatives?

I have been looking around SO and Google, but I couldn't really get a definitive answer. PHPUnit is a framework for unittesting, like JUnit. I use it, also in combination with the Selenium-extension for functional testing. When browsing around I see…
qrazi
  • 1,406
  • 1
  • 15
  • 18
33
votes
3 answers

JavaScript BDD: Vows & Kyuri Vs. Jasmine

I was going to go with Vows and Kyuri, but then I found out about Jasmine. Which do you recommend? Vows or Jasmine? Is there a Cucumber implementation that works with Jasmine?
ma11hew28
  • 121,420
  • 116
  • 450
  • 651
33
votes
2 answers

How to regenerate designer code for all SpecFlow features

I've got ~30 SpecFlow feature files, and I recently removed the Foo.feature.cs files from source control because I got sick of resolving merge conflicts in Designer Generated code. I did not exclude or remove these files from my Visual Studio…
Greg Burghardt
  • 17,900
  • 9
  • 49
  • 92
32
votes
2 answers

jasmine unit testing - testing for an undefined property of an object

I have the following statement expect(A.["BAR"].name).toEqual("foo"); which due to the fact my object A has the top level property "BAR" and bar has the value "foo" passes. I'd like to test my structure to confirm a property "NONEXISTINGPROP" has…
wmitchell
  • 5,665
  • 10
  • 37
  • 62
32
votes
6 answers

Factory Girl: How to set up a has_many/through association

I've been struggling with setting up a has_many/through relationship using Factory Girl. I have the following models: class Job < ActiveRecord::Base has_many :job_details, :dependent => :destroy has_many :details, :through =>…
cman77
  • 1,753
  • 1
  • 22
  • 48
32
votes
4 answers

FactoryGirl screws up rake db:migrate process

I am doing TDD/BDD in Ruby on Rails 3 with Rspec (2.11.0) and FactoryGirl (4.0.0). I have a factory for a Category model: FactoryGirl.define "Category" do factory :category do name "Foo" end end If I drop, create then migrate the database…
Ilea Cristian
  • 5,741
  • 1
  • 23
  • 37
31
votes
1 answer

TDD / BDD with React.js?

Really not that much information out there on this subject. I gather Jest would be the Facebook recommended test environment and obviously there are plenty of other testing frameworks which is irrelevant as I'm trying to obtain a list of TDD/BDD…
cmdv
  • 1,693
  • 3
  • 15
  • 23
31
votes
6 answers

Behavior Driven Development for java - what framework to use?

For the ongoing projects and for improving our development process we considered adopting TDD as development philosophy. While researching for best practices and how to "sell" the new approach to my colleagues/ developers I came across BDD and found…
Olimpiu POP
  • 5,001
  • 4
  • 34
  • 49