Questions tagged [bdd]

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.

BDD stands for "Behavior-Driven Development," a software development style that encourages cooperation between developers and stakeholders through conversation around different examples of how a system or element of code might behave. BDD builds on test driven development by replacing the concept of "testing" before the code is written with the natural language of scenarios and examples. This makes it easier for people (often non-technical) involved in the specification and design of the software to discuss, capture and evaluate the intended behavior.

142 questions
249
votes
8 answers

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

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 separately? Is it necessary to write test cases for…
arjun
  • 2,695
  • 3
  • 15
  • 10
93
votes
12 answers

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, and have the big advantage of verifying their own…
Chris Devereux
  • 931
  • 2
  • 7
  • 9
69
votes
7 answers

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 personal project to write a little money management…
Yggdrasil
  • 908
  • 1
  • 7
  • 10
49
votes
8 answers

How do I really write tests without mocking/stubbing?

I have been using TDD when developing some of my side projects and have been loving it. The issue, however, is that stubbing classes for unit tests is a pain and makes you afraid of refactoring. I started researching and I see that there is a group…
kibe
  • 728
  • 1
  • 7
  • 11
33
votes
4 answers

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 yes, should my TDD unit tests be named in the same…
SiberianGuy
  • 4,753
  • 6
  • 34
  • 46
31
votes
13 answers

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 92%-95% in javascript/jquery?
willz
  • 429
  • 1
  • 4
  • 7
27
votes
3 answers

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 = new ShopStock(); Item blackSweater = new…
Cognitive_chaos
  • 373
  • 1
  • 3
  • 5
26
votes
11 answers

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 automated tests, I don't think I need to make a…
orangepips
  • 563
  • 5
  • 9
25
votes
4 answers

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 definitely agree that Gherkin, or whichever feature…
MattiSG
  • 1,932
  • 2
  • 13
  • 16
24
votes
7 answers

TDD/Tests too much an overhead/maintenance burden?

So you've heard it many times from those who do not truly understand the values of testing. Just to start things out, I'm a follower of Agile and Testing... I recently had a discussion about performing TDD on a product re-write where the current…
Martin Blore
  • 4,645
  • 5
  • 29
  • 35
24
votes
4 answers

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 was born as an improvement from TDD. Great, I…
JSBach
  • 1,365
  • 2
  • 14
  • 27
23
votes
5 answers

Is BDD scalable for medium to large projects?

In every Website you read about BDD (Behaviour Driven Development) you find a very simple nice example showing you how obvious and easy is it to define your requirements. But trying to implement this process in a big product (not a calculator…
D.D
  • 489
  • 6
  • 19
20
votes
7 answers

Is it a good idea to write all possible test cases after transforming the team to TDD to achieve a full coverage?

Assume we have a large enterprise-level application without any unit/functional tests. There was no test-driven development process during the development due to very tight deadlines (I know we should never promise any tight deadlines when we are…
13
votes
6 answers

What is the role of QA in a BDD 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 developers would write the acceptance tests in conjunction…
Armand
  • 6,508
  • 4
  • 37
  • 53
13
votes
1 answer

Does BDD and DDD work well together?

Behavior-Driven Development (BDD) can be described as in this blog post as follows: Behaviour-driven development (BDD) takes the position that you can turn an idea for a requirement into implemented, tested, production-ready code simply and…
user1620696
  • 4,817
  • 7
  • 31
  • 46
1
2 3
9 10