Knowing that BDD somehow avoids using the term "test", I am trying to understand the process as described in a book called The Journey to Enterprise Agility: Systems Thinking and Organizational Legacy.
They describe the BDD process like that:
- Select a scenario from a feature
- Write a failing scenario step
- Write a failing test to support the behaviour detailed in the failing steps
- Write the code to make the unit test pass
- Refactor
- If the step passes, move on to next step, otherwise discover more objects to support the behaviour detailed until step passes.
The "Given", "When", "Then" are considered the steps.
The sample scenario was "Given I am on a product detail page.."
Below the diagram, they explain: ...
The next action is to create a failing scenario step. In this instance, you would create code that confirms that the product page can be displayed.
I do not get it. What is the failing scenario step, if not a test (and it does not seem to be the test as those are mentioned in step 4)? If it is not the test (but any other code), am I not breaking the TDD rule (test first)?
The link to the book and original text: https://books.google.de/books?id=p30gFQycCHEC&pg=PA493&dq=BDD+process+refact&hl=cs&sa=X&ved=0ahUKEwi5pcypr57bAhXD_aQKHexgB2AQ6AEIXTAG#v=onepage&q=BDD%20process%20refact&f=false