Bad or Good? Behavior Driven Development within Scrum.

I wanted to explore the possibility of using JBehave to formalize scrum's definition of done. The idea being to encapsulate a definition of done as a JBehave scenario. So in true scrum style I decided to timebox 4 hours of work dedicated to JBehave.

From a scrum point of view BDD can be used to turn the definition of done into a test artifact. The team produces scenarios for each task. With JBehave a scenario file describes the required behavior and test steps it will need to pass to be considered done. I.e Given some prerequisites, perform some action and expect some results. See the JBehave project for more detail as this is only a simple example.

Do You Need to Test Everything?

At my previous job at a big multinational company, we didn’t have anything remotely resembling an automated test. What manual testing we did consisted of dragging and dropping a folder and mashing F5. When we skipped testing, however, the users ended up doing it for us. After they did their round of testing, they would call or show up at our office, wondering angrily why the product was not working as they expected.

I start with this story because I don’t want you to think that I do not value tests. I do. Very much. I believe we can’t live without them. But you can have too much of a good thing. However vital water may be, too much of it results in a flood.

You Get a Test; You Get a Test; Everyboooody Gets a Test!

Everybody gets a test…

Tests are living documentation, messages to other developers (and our future selves) about what the code is supposed to do. Tests enforce requirements and provide feedback, telling us when something breaks.

Understanding Bounded Context

Introduction

If someone asks you the meaning of a word, most of the time you don’t have an absolute meaning and end up asking for the context in which it is used. You need to know the context to get to the correct meaning. Similarly, to know your domain model right, you get to know the bounded context it is in.

Let us understand the path that leads to bounded contexts.

What BDD Is and Why You Need It: Java and Behavior Driven Development

Is Behavior Driven Development Just Another Religion?

You might hear about BDD but still don't have a clear understanding of what it is. Here I'll try to simplify the main ideas and provide clear examples. This article is useful not only for developers but all people involved in the development process like analysts, product owners, and even guys from the business.

BDD Makes Application Logic More Transparent

Low Transparency in Application is a very known problem in IT. Quite often domain knowledge belongs only to the development team. As a consequence, to get even a simple answer you have to ask the developer to explain.

TDD vs. BDD vs. ATDD — Developers’ Methodologies to Smoothly Navigate Complex Development Processes

Introduction

The last decade in the history of humanity can be easily called the technological revolution. The pandemic made it starker than ever before. The developers need to keep pace with the new languages, frameworks, tools, and processes that come into being every second.

To write code is a developer’s second nature. But, what code to write, how to write it, when to write it, and for what purpose may easily overwhelm even the most experienced and expert developers when it is raining new codes and processes day in and day out.

API Testing With Cucumber

An API represents a set of rules that enables services to communicate with each other. It is important to have a shared understanding of the API by the stakeholders. Behavior Driven Development (BDD) allows us to describe behaviors that are understandable to domain experts, testers, and developers through examples. A well-written example serves to represent a balanced view of competing concerns -

  • Shared understanding. An example can be shared among API stakeholders to promote communication and understanding.
  • Tests.  Implement the example as an automated test to check the functionality of the API.
  • Documentation. An example can be used by anyone to understand the system.

BDD is a very apt tool to test APIs. We will use Cucumber that supports BDD to test APIs developed in Java. One advantage of doing so is that the Java developer who implemented the API does not have to learn a new language to test it.

BDD-Based Integration Testing Framework for Nebula Graph: Part 2

In BDD-Based Integration Testing Framework for Nebula Graph: Part 1, I introduced the evolution of integration testing for Nebula Graph. In this article, I will introduce how to add a test case into the test set and run all the test cases successfully.

Preparing Testing Environment

At the beginning of building the testing framework for Nebula Graph 2.0, we developed some tool classes to help the testing framework quickly start and stop a single-node Nebula Graph cluster, including checking for port conflicts and modifying part configurations. Here is the original execution procedure:

BDD Tests on Github Actions With Cucumber Run in Parallel Jobs

Cucumber employs Behavior-Driven Development (BDD) for testing your application. This type of test is often time-consuming when running in the browser. You will learn how to run Cucumber tests on Github Actions using parallel jobs to execute the test suite much faster.

Github Actions Matrix Strategy

Selenium Python Tutorial: Getting Started With BDD In Behave

As technology becomes more complex, the number of people who actually understand it decreases. With Selenium test automation, the story is not so different, key stakeholders in a project, with the nontechnical background but with more insight into customer demand and use cases, might find it difficult to contribute to the process. 

Wouldn’t it be great, if the testers, developers, product managers, business managers, and other stakeholders in a project could sit under one roof to unearth new test cases, user stories and bugs for ensuring awesome product quality? 

Putting BDD in Practice Using Scala

This article aims to give a brief explanation of what BDD is and how it can be used to fill the information gap between stakeholders and development teams, ensuring everyone (technical or not) is involved in the project’s progress.

The first time I had contact with this approach to software development was a few years ago during a Massive Open Online Course (MOOC) and, I must warn you, I've never applied it in production. Nevertheless, I'm fully aware this is not the holy grail and it might not work so well as advertised, but the idea of having everyone on the team (not only developers) collaborating on the development process sounded very romantic to me.

Acceptance Tests in Java With JGiven

Most of the developer community know what a unit test is, even they don’t write them. But there is still hope. The situation is changing. More and more projects hosted on GitHub contain unit tests.

In a standard set-up for Java projects like NetBeans, Maven, and JUnit, it is not that difficult to produce your first test code. Besides, this approach is used in Test Driven Development (TDD) and exists in other technologies like Behavioral Driven Development (BDD), also known as acceptance tests, which is what we will focus on in this article. 

5 Reasons to Model During QA, Part 5: A “Single Pane of Glass” For Technologies and Teams

Modeling lets helpful information go both ways.

Welcome to the final installment of 5 Reasons to Model During QA! If you have missed any of the previous four articles, jump back in to find out how modelling can:

  1. Identify bugs during the requirements analysis and design phase, where they require far less time and cost to fix;
  2. Drive up testing efficiency, automating the creation of test cases, test data and automated test scripts;
  3. Maximise test coverage and shorten test cycles, focusing QA on the most critical, high risk functionality;
  4. Introduce QA Resilience and Flexibility to change, automatically updating a rigorous test suite as requirements evolve.

This last article in the series shifts focuses to consider modeling within the broader context of the Software Delivery Lifecycle. It goes beyond QA, considering how models deliver value to the BAs, developers, and testers who can work collaboratively from them.

Serenity Ensure – Fluent Assertions in Serenity Screenplay

Assertions are an important part of any test automation framework, and Serenity gives us many options. You can, of course, use standard JUnit, Hamcrest or AssertJ assertions at any point in a Screenplay test. But more recent versions of Serenity Screenplay provide an alternative approach, which many developers find easier to use and faster to write: the serenity-ensure module.

Introducing serenity-ensure

The Ensure class produces a Performable, so you can integrate them directly into the attemptsTo() method. It also has a very readable DSL and lets you use code completion to discover the assertions you can use for different values, making writing assertions easier and quicker.

Handling Manual Tests in Serenity BDD

One of the principles of BDD is to have a single source of truth for both the requirements that describe a feature and the automated tests that verify them. And it is a natural step to want to include both automated and manual tests in this single source of truth.

Cucumber is primarily and traditionally used for automating executable specifications. But with Serenity BDD, you can add special tags to indicate that a scenario represents a manual test case.

A Guide to Cucumber Best Practices

In this post, we’ll share some good Cucumber practices, especially when writing scenarios using the Gherkin language, clarifying some BDD concepts and from these practices, how to build better scenarios.

BDD is a development strategy, and even if you do not follow this practice, we find it beneficial to use Cucumber (or a similar tool) since it "forces you" to document your automated tests before implementing them. It’s fundamental that these tests be made clear to a user who does not know the behavior of the described functionality and that they be maintainable to reduce the costs of making changes in the test steps.
This image by Cucumber reflects the idea of combining automated tests, having a living documentation, and at the same time, still having specifications that are executable. All of this is thanks to the approach of using a tool like Cucumber.

What is BDD and What Does it Mean for Testers?

Behavior-Driven Development (BDD), as its name indicates, is not a testing technique, but rather a development strategy (as well as TDD, which is Test-Driven Development). What it proposes is to define a common language for the business and the technical team members, using it at the outset of development and testing, which is why it's important for testers to understand BDD.

BDD and TDD

I used to think about BDD as an evolution of TDD, but then I realized that it is much more than a simple evolution. It's a different approach that solves a different problem. In TDD, the focus is on the unit test, while in BDD, the focus is testing on a higher level, functional and acceptance testing, as its aim is to comply with the business and not just with the code.