BDD stands for "Behavior-Driven Development," a software development style that encourages cooperation between developers and stakeholders through identifying and exploring different examples of how a system or smaller element of code might work from a user's perspective.

learn more… | top users | synonyms

9
votes
5answers
1k views

When writing specs BDD-style, should you use “should”, or should you not?

I realize this is somewhat subjective, but I can't find a good case for one or the other : it "should do something" it "does something" Proponents of the should style mention that it forces ...
78
votes
12answers
7k views

Is there a reason that tests aren't written inline with the code that they test?

I've been reading a bit about Literate Programming recently, and it got me thinking... Well-written tests, especially BDD-style specs can do a better job at explaining what code does than prose does, ...
1
vote
1answer
67 views

Side-by-side Functional and Acceptance Testing (SpecFlow)

Edit: I have found a closely related question: StackOverflow This question is not about the differences between functional and acceptance tests! Almost all the info I could find on the web just ...
1
vote
3answers
1k views

How can I get the business analysts more involved in BDD?

I am a proponent of Behavior Driven Development, mainly with Cucumber and RSpec, and at my current gig (a Microsoft shop) I am introducing SpecFlow as a tool to help with testing. I'd like to get the ...
3
votes
2answers
249 views

Differences between Given When Then (GWT) and Arrange Act Assert (AAA)?

In TDD there is Arrange Act Assert (AAA) syntax: [Test] public void Test_ReturnItemForRefund_ReturnsStockOfBlackSweatersAsTwo_WhenOneInStockAndOneIsReturned() { //Arrange ShopStock shopStock ...
10
votes
1answer
128 views

Migrate legacy requirements to BDD

Q: What is the best way to move a large company to Cucumber with at least 15 years of legacy software requirements maintained in a requirements database? Currently considering: 1) Migrate Everything ...
0
votes
4answers
627 views

Should I use TDD and BDD if my project is changing fast?

I have my own little project I am creating using RoR, I plan it to have small-medium load. With no doubt I started with BDD and TDD (Cucumber and RSpec to be exact, but I am also experienced with ...
14
votes
3answers
3k views

Relation between BDD and TDD

What is the relation of BDD and TDD? From what I understood BDD adds two main things over TDD: tests naming (ensure/should) and acceptance tests. Should I follow TDD during development by BDD? If ...
23
votes
11answers
2k views

Automated Testing: Explaining its Business Value

To start I don't think this is a repeat of other questions on unit testing. What I'm looking for help with is articulating its value to a team of programmers, analysts, managers and testers. By ...
-2
votes
3answers
155 views

TDD/BDD: Mocks with expectations: bad? [closed]

Is using mocks in the following way a bad idea: writing tests where mocks expect certain calls from the subject under test Or even just writing mocks that return values to the subject under test ...
2
votes
1answer
155 views

TDD/BDD - Properly defining tests, adjusting tests, putting describe blocks inside it blocks

I am coming around with TDD/BDD. I am a bit confused though, when it comes to initially writing my BDD tests and then adding more tests after the very broad tests. For Example, lets say that I am ...
22
votes
10answers
4k views

Is 100% code coverage a pipe dream?

Is it feasible to expect 100% code coverage in heavy jquery/backbonejs web applications? Is it reasonable to fail a sprint due to 100% coverage not being met when actual code coverage hovers around ...
3
votes
2answers
100 views

How to track technical tasks with BDD?

I am working on a team that is adopting BDD for the first time. We are doing greenfield work building a market data system that allows users to request market data from different sources. We are ...
2
votes
1answer
56 views

TDD Duplicate Testing on Related Classes

In following the principle of testing only the exported functions on a package (using Go - or for others languages, the public functions on a class), I'm running into a scenario where related packages ...
0
votes
1answer
2k views

Jasmine BDD vs Integration Tests

Let's say I need to write a test for the front end, in the following BDD style: A user visits buysomething.com, saves something to their wishlist, and a saved item count is updated. The result ...
1
vote
2answers
56 views

Which style to use for features that are not directly driven by humans when using BDD Gherkin language?

Should they be written same way as human workflows, first person "I have entered..." style language etc.? Is the user effectively a gender-less "AI"?
1
vote
1answer
272 views

Behat/Mink: best practice for testing strings in a web application's GUI

I'm writing acceptance tests for a web application using Behat/Mink. I want to know best practice for testing strings in the GUI. For example: say I want to test that a link exists on the homepage ...
2
votes
2answers
1k views

BDD, Cucumber best practices

I'm trying to understand some best practices when it comes to BDD and Cucumber. I've only recently started to use it, and the first feature I have written a test for is testing a search feature, more ...
3
votes
2answers
151 views

Gherkin: What is a reasonable number of scenarios per feature?

I'm keen to get thoughts on a reasonable number of scenarios per feature in Gherkin. At what point do you start to thing about re-organising the feature to keep the number of scenarios at a ...
23
votes
4answers
1k views

Is BDD actually writable by non-programmers?

Behavior-Driven Development with its emblematic “Given-When-Then” scenarios syntax has lately been quite hyped for its possible uses as a boundary object for software functionality assessment. I ...
2
votes
1answer
255 views

Javascript unit testing - mocks or fixtures?

Interested in some opnion... I'm introducing unit testing of JS into a team, it'll largely be testing modules with many dom interactions and updates. Traditionally I've always used mocks and spys ...
210
votes
8answers
137k views

What is the difference between writing test cases for BDD and TDD? [duplicate]

I have been learning writing test cases for BDD (Behavior Driven Development) using specflow. If I write comprehensive tests with BDD, is it necessary to write TDD (Test Driven Development) test ...
1
vote
1answer
168 views

BDD: Is it wrong to call it “Behaviour Driven *Design*”?

I learned the concept of BDD in this nice book, where the authors continuously refer to it as Behavior Driven Design, rather than using the term "Development". I've been using this definition since ...
0
votes
2answers
125 views

Git Workflow for BDD?

Recently I was working with Behavior Driven Development approach in Rails using RSpec and Capybara. Everything looks okay and it even can speed up whole planning-development bridge in my work (by ...
6
votes
4answers
4k views

Behavior Driven Development and Unit Testing in Python [closed]

We might be interested in starting to incorporate a unit test suite to our project, which is coded in Python (and it uses Redis, PostgreSQL and some third-party libraries, if that bears into the ...
9
votes
3answers
3k views

How to use unit tests when using BDD?

I am trying to understand BDD. I've read some articles and as I understood BDD is "the next step" from TDD. I say that because I find both to be very similar, and as I could read in this article, BDD ...
2
votes
3answers
435 views

Is TDD the best software development philosophy? [closed]

Question: Why not just use BDD-style acceptance tests and do away with unit tests, integration tests, functional tests and all other tests? I have been doing some research into the differences ...
1
vote
4answers
195 views

How handle a chain of Whens or Thens in a Scenario?

I am trying to figure out how to write BDD scenario where it seems like I need a chain of "Then" conditions. How do I write it? As one scenario? As two scenarios? Here is how I've written as one ...
3
votes
1answer
98 views

How specify acceptance criteria for randomness?

How would I express a Behavior Driven Development (BDD) acceptance criteria/story/scenario that indicates items should be random to some degree on a Home screen of an app like Instagram? Here's what ...
5
votes
3answers
589 views

Working with legacy code - introducing an external BDD integration test harness

Here's the scenario. There's a large, organically grown application written in some language and manner that makes it difficult to test. It works but is hard to maintain. Specifications are ...
3
votes
1answer
416 views

How use same Behavior Drive Development (BDD) stories across platforms?

I'm writing an app that has a client for iOS, Android, and the web. The server is hosted on Google App Engine (Java). REST is used for the communication between clients and server. In order to ensure ...
3
votes
1answer
152 views

What TDD/BDD tests should be writen to test an ORM

So I'm writing an ORM for NodeJS and using Mocha + Chai to test it. What I want to know is, what tests I should write to it, insertion tests should also have a querying test so I can check if the ...
3
votes
2answers
167 views

Can BDD and Lean methodologies be used together?

I was chatting with my product manager last week and he was bemoaning the lack of progress on our product. It's a fair criticism, too. So we got to talking about to describe the writing of ...
1
vote
1answer
232 views

Unit test approaches other than test-first and test-last? And what about variants of them? [closed]

I'm wondering if there are other approaches, old or new, to writing unit tests, and how viable they are, other than the traditional and tdd unit testing approaches. I know there is behavior-driven ...
9
votes
6answers
2k views

What is the role of QA in a BDD-driven project?

If running a project using BDD with 100% coverage of user stories with automated acceptance tests, what would be the role of a tester / quality assurance person? I guess I am imagining that ...
0
votes
1answer
65 views

Scenarios for library that will be used by developers

I've started learning BDD but I think I have some misunderstanding of how to use it correctly. Currently I'm writing an API for a product. This API will be used by other developers only. Is it ok to ...
5
votes
5answers
1k views

If we have TDD and BDD why do we need QA for? [duplicate]

If we have TDD and BDD why do we need QA for? Isn't the job of the developer to write bugs or failing tests? If this is true how a QA fit in? Thanks.
1
vote
2answers
161 views

In the BDD paradigm why should the “ubiquitous language” be merely semi-formal and not completely formal?

Here's the relevant quote: A common risk with software development includes communication breakdowns between Developers and Business Stakeholders. BDD uses the specification of desired behavior as ...
1
vote
2answers
372 views

BDD/TDD - exhaustively testing details which are low-level, but still behaviour

We're looking to concentrate more on testing behaviour (as opposed to every class/method individually) in all our automated tests, as espoused by various high-profile online discussions recently. I ...
0
votes
2answers
91 views

How to manage client expectations when working with a BDD type framework? [closed]

I've recently been investigating SpecFlow and can see the value of it for writing client/stateholder specs which can show a feature's progress however I'm nervous of introducing them to a client... ...
4
votes
2answers
172 views

BDD based on 1-liner requirements

In our team, the product owner only gives us a 1-liner summary. The developers then come up with a PoC, which the product owner reviews and the cycle repeats. The challenge here is 2-fold: Time: ...
3
votes
1answer
190 views

In BDD, going from feature to user story how does it works?

My background is the book BDD in action. How one goes from Feature to Stories? More specifically I would like to understand the following: 1- When does one provide the decomposition into stories? Do ...
4
votes
1answer
297 views

Testing gap between unit and integration: Integration in the Small, Component, Unit Integration Tests

Over the past few weeks I've been mulling and researching how to fill a gap in our testing methodology. In simplified terms unit tests are too small and traditional integration tests are too big. A ...
0
votes
1answer
348 views

In an enterprise setting, does one apply BDD principles alongside of, or instead of, “traditional” unit testing?

I have a problem visualising how the gap is closed between coarse-grained, n-tier boundary, high level, automated acceptance testing and lower level, task/sub-task scope Unit Testing. My motivation ...
2
votes
1answer
1k views

acceptance test driven development in c++

Was put on hold at stack overflow: hopefully it has value here. I want to use a BDD / TDD / ATDD approach in c++. However I really want to emphasize vertical slices of end to end functionality rather ...
1
vote
0answers
132 views

automated acceptance testing / BDD & workflow for designing a system

Recently, I started reading the book Specification by Example, which relates to automated functional testing and BDD (from what I've understood till now). I've tried using Concordion (.Net), and ...
0
votes
1answer
670 views

The user interface in a clean architecture with client / server model [closed]

I have been reading (and watching presentations) about subjects like: DDD, TDD, BDD, SOLID (principles), design patterns, clean code, clean architecture, agile project methodologies. All in all I ...
40
votes
7answers
7k views

Is it sufficient to use acceptance and integration tests instead of unit test?

Short introduction to this question. I have used now TDD and lately BDD for over one year now. I use techniques like mocking to make writing my tests more efficiently. Lately I have started a ...
6
votes
3answers
7k views

How do you unit test a User Interface? [closed]

I use JavaScript with JQuery for a Rails application. I have some dynamic behaviour in this one. As a Ruby developper, I like TDD/BDD, specialy with RSpec. For the moment, I test my JavaScript ...
3
votes
3answers
307 views

Should selenium tests be written in imperative style?

Is an automation tester supposed to know concepts of OOPS and design patterns to write Tests in a way where changes & code re-use are possible? For example, I pick up Java to write cucumber step ...