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
30
votes
9 answers

What's the state of TDD and/or BDD in PHP?

How widespread, supported, developed is testing in the PHP world? On par with Java? Up there with Ruby/Rails? I Googled and found that testing frameworks exist but I'm wondering if they're widely used. Do the major PHP IDE's have built-in test…
Ethan
  • 57,819
  • 63
  • 187
  • 237
30
votes
6 answers

SpecFlow / BDD Examples

Just looking for some examples of BDD/SpecFlow - ideally a projectб so I can see how to use SpecFlow on big projects where multiple features my reference the same steps etc. I've read a few blogs over the last few months, but haven't had a nice,…
nick
  • 1,477
  • 2
  • 20
  • 29
29
votes
8 answers

Capybara - Submit a form without button

I am trying to submit a form without button using just Capybara and Rspec (no Cucumber or Selenium, I know there is already a question about that). I've seen there is a gist to add a method to submit a form without button: module…
Alessandro De Simone
  • 4,085
  • 6
  • 28
  • 41
29
votes
6 answers

SpecFlow/BDD for Unit Tests?

Seems like the internet doesn't have a definitive answer, or set of principles to help me answer the question. So I turn to the great folk on SO to help me find answers or guiding thoughts :) SpecFlow is very useful for BDD in .NET. But when we talk…
Nicko-Mctricko
  • 461
  • 5
  • 6
29
votes
12 answers

Eat, Sleep and Breathe Unit Testing/TDD/BDD

I do write unit tests while writing APIs and core functionalities. But I want to be the cool fanboy who eats, sleeps and breathes TDD and BDD. What's the best way to get started with TDD/BDD the right way? Any books, resources, frameworks, best…
Langali
  • 3,189
  • 7
  • 38
  • 45
29
votes
5 answers

Is it acceptable to write a "Given When Then When Then" test in Gherkin?

Is it acceptable to write a "Given When Then When Then" test in Gherkin? A real-life example is as follows all AllPlayers.com Scenario: Successfully register a user Given I am on homepage And I am not logged into an account When I follow…
General Redneck
  • 1,240
  • 2
  • 13
  • 28
28
votes
9 answers

What's a good way to reuse test code using Jasmine?

I'm using the Jasmine BDD Javascript library and really enjoying it. I have test code that I'd like to reuse (for example, testing multiple implementations of a base class or running the same tests in a slightly different context) and I'm not sure…
glenn
  • 651
  • 1
  • 6
  • 14
28
votes
2 answers

Is it ok to have multiple groups of Given/When/Then in a single gherkin scenario

I'm writing acceptance tests in Gherkin where I want to test for multiple changes in the UI of a web app based on an initial action. Here's an example: Scenario: Cancel editing a new text asset Given the user…
Geoffrey Hing
  • 1,575
  • 2
  • 15
  • 22
28
votes
2 answers

QUnit Vs. Jasmine and TDD Vs. BDD

I've been looking at two libraries for doing unit tests on the front-end. QUnit - http://qunitjs.com/ Jasmine - http://jasmine.github.io/ Jasmine is clearly more BDD focused than QUnit although I could see doing BDD with QUnit by describing the…
Mims H. Wright
  • 3,049
  • 1
  • 25
  • 30
28
votes
6 answers

BDD in Objective-C

I have recently started to learn Objective-C and write my tests using OCUnit that comes bundled with Xcode. I'm a long time Ruby programmer and I'm used to RSpec and Cucumber - nice BDD frameworks. Is there a decent BDD framework to use in…
Bragi Ragnarson
  • 523
  • 4
  • 10
27
votes
3 answers

Behat over Cucumber in PHP

Don't get me wrong. I think both projects are fantastic. But as both php and ruby developer I wonder if there are there any compelling reasons, besides possible language barrier, why would one choose Behat over Cucumber (with cuke4php) for BDD even…
Krule
  • 6,468
  • 3
  • 34
  • 56
26
votes
6 answers

Given When Then Testing - Do I NEED a "When"?

I am implementing some smoke tests to our website. I'm using a Given/When/Then format for existing automated acceptance tests/User stories. But now I want to do an initial smoke test of: Given I'm on the homepage Then I should see "Welcome To The…
Dan Black
  • 1,167
  • 3
  • 14
  • 20
26
votes
3 answers

How to find Cucumber steps that are not used

I've been working with Cucumber for about a year and have been continually refactoring the features and step definitions along the way. I have tons of steps defined across many files and I can't help but feel like many of them are no longer needed.…
Peter Brown
  • 50,956
  • 18
  • 113
  • 146
26
votes
12 answers

What's the best way to implement BDD/TDD in .NET 2.0?

I'm looking to add a testing suite to my application, however I can't move to the newer testing frameworks for .NET 3.5. Does anyone have a suggestion about good testing frameworks to use?
qrush
  • 1,003
  • 10
  • 11
26
votes
2 answers

What does assigns mean in rspec

What does that line of code do? assigns(:articles).should eq([article]) in the following rspec describe "GET #index" do it "populates an array of articles" do article = Factory(:article) get :index …
Aydar Omurbekov
  • 2,047
  • 4
  • 27
  • 53