Talk:Behavior-driven development: Difference between revisions

Content deleted Content added
Bpappin (talk | contribs)
Line 154:
 
:Why? Human nature. ... I assume you are suggesting it shouldn't have that slant. Rather than complaining about the content I suggest you improve it. ... I think the lead ''defines'' BDD with what are ''purported benefits''. I think the lead should be re-written to say what it is and then later to list the pluses ''as described by supporters''. In particular, the last lead paragraph, "BDD is largely facilitated through the use of a simple ___domain-specific language (DSL) using natural-language constructs (e.g., English-like sentences) that can express the behaviour and the expected outcomes" is a good start for a definition. [[User:Stevebroshar|Stevebroshar]] ([[User talk:Stevebroshar|talk]]) 14:25, 16 April 2024 (UTC)
 
== The link between BDD and TDD may not be appropriate. ==
 
The article states "BDD is considered a refinement of test-driven development (TDD)" but it's really not.
 
TDD is a process for writing tests BDD is a way of writing tests that describe a behaviour.
 
BDD is about behaviour, how does a block of software behave, given various conditions. A BDD test will involve many component or use mocks to emulate components. A BDD test would be made up of smaller components that have already had TDD applied.
On the other hand, the TDD process by which you write unit tests, is about small incremental tests. Given certain input data, what is the expected output, one by one. TDD tests very small blocks of code, one at a time, until all the tests pass.
 
You also have to write the test differently by necessity.
TDD is done line by line, given input test the output. Red/Green Refactor. It shapes the codebase as you go with two initial clients of the code.
BDD requires a more complex structure, before a test can pass, and the individual components the make up the behaviour, should be tested first with TDD.
 
Pretty much the only real connection is the terminology adapted from TDD, and the structure of test classes and how that is set up. They look similar, but they are not testing the same things, nore do they really borrow from one another in terms of process. [[User:Bpappin|Bpappin]] ([[User talk:Bpappin|talk]]) 21:01, 7 August 2024 (UTC)