BDD: Tasks and Activities

BDD: Tasks and Activities

It's a beautiful Monday, and your project leader, after spending a weekend at a software quality conference, comes to you with an important task. After attending a talk on BDD and being thrilled by it, he now wants you to include Behavior Driven Development practices in the company's projects.

You understand the great benefits of BDD, but how do you accommodate it in an agile process with tests, modular deliveries, etc.?

Well, you find yourself in a big predicament. But nothing that a software engineer isn't used to. As a first measure, you try to find some material on the subject on the internet. You end up finding excellent books on the subject (https://bddbooks.com/index.html) and you come across a list of activities related to BDD. A simplified version is illustrated in the figure below.

BDD tasks and activities.

The big question is that BDD can fit into virtually any software development process. In this example, we can see how, from a user story, we can get to the software coding. If unit tests are used, nothing changes! We just start writing the tests as soon as the scenarios are automated.

Well, let's move on to the activities involved:

Discovery: a set of practices that uses concrete examples to break down the ambiguities present in the requirements. The main result of this activity is a shared understanding of the use cases.

Formulation: in this activity, the examples discussed in the Discovery phase are transformed into Scenarios following a standardization and business-oriented language. Generally, the examples are written using the Gherkin language (https://cucumber.io/docs/gherkin/reference/).

Automation: in this phase, automated tests are written for each of the formulated examples (in Gherkin). This way, we can check if the user stories are still valid after some changes at the code.

According to these activities, we will move from our traditional use cases (you know? that dead documents!) to testable examples, using a language completely understandable by the client.

要查看或添加评论,请登录

Diego Fialho的更多文章

  • Git and GitFlow: How to Improve Your Repository Organization

    Git and GitFlow: How to Improve Your Repository Organization

    Nowadays, we can't live without a version control tool for software development, and this need becomes even more…

    1 条评论
  • The Paradox of Code Comments

    The Paradox of Code Comments

    We all know that comments are very important in any programming language. And who hasn’t come across code that was…

    1 条评论
  • What to Do When Faced with a Bug?

    What to Do When Faced with a Bug?

    If you’ve been in the development field long enough, you’ve likely encountered errors or strange software behavior…

    2 条评论
  • Do @Annotations create a dependency relationship?

    Do @Annotations create a dependency relationship?

    No one doubts the effectiveness of annotations in Java. Since they were included in the language, their use has been…

    1 条评论
  • BDD: A Discovery example

    BDD: A Discovery example

    In our last article, we discussed tasks and activities in BDD. Now it's time to delve a little deeper into the first…

    4 条评论
  • BDD: the missing link between requirements and code

    BDD: the missing link between requirements and code

    Well, at this moment you might be wondering if this gap between requirements and code isn't what we generally call…

社区洞察

其他会员也浏览了