TDD vs BDD Test Specifications Flashcards

1
Q

What does Test-Driven Development?

A

It’s a software development process where software requirements are turned into test cases. Then, the software is improved until those tests pass. Throughout development, those tests are run over and over again, giving feedback to the programmer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Is pure-TDD suitable for every situation?

A

No – it can be too extreme for most situations as you probably won’t know all the tests before building software and it’s often more important to have a feedback loop.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the differences between TDD and BDD?

A

They are technically the same. The difference is in the vocabulary and approach.

  1. In TDD, the terminology is around testing, including tests and test suites. This leads developers to describe when something works and when it doesn’t.
  2. BDD uses terminology about behavior examples. This way, developers explain how and why something works with concrete examples.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the main problem with TDD?

A

It can be too literal, which can often lead to fragile, overly-specific tests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How does BDD overcome the extremism of TDD?

A

In BDD, acceptance criteria is a scenario with a common structure.

GIVEN some initial context (the givens),
WHEN an event occurs,
THEN ensure some outcome.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly