Development Flows by Patrik

Behavior-Driven Development

Behavior-driven development (BDD) is a variation of TDD that uses a domain-specific scripting language (DSL) to describe tests, which are then converted into executable tests. It encourages collaboration among developers, QA, and non-technical or business participants in a software project.

This approach requires the use of a framework (such as SpecFlow) that can translate the DSL statements into executable instructions (in programming languages such as C#). The job of the engineer is no longer to code the tests but to code the DSL translation actions into executable code.

behavior-driven development flow has the following steps:

1. Define the criteria the feature will meet

  • Create Test Cases, for example: "Given two numbers, 1 and 2, when adding the two numbers, then the method returns 3" and "Given two numbers, -1 and -2, when adding the two numbers, then the method returns -3"

2. Create the tests that the build must pass - Define Test Steps.

  • If the build passes the test, done
  • If the test doesn't pass, design and implement the application according to the expectations defined. The test must pass for the feature to be completed.
Development

Comments

Leave a Comment

All fields are required. Your email address will not be published.