Questions tagged [bdd]
BDD stands for "Behavior-Driven Development," a software development style that encourages cooperation between developers and stakeholders through identifying and exploring different examples of how a system or smaller element of code might work from a user's perspective.
148 questions
1
vote
1
answer
117
views
How should I design a password reset flow when the PasswordService depends on UserRepository (email vs ID)?
I’m working on a three layers architecture backend (Laravel).
Here’s the context:
I have a PasswordService responsible for updating a user’s
password.
and a Otpservice responsible for verifying/...
1
vote
0
answers
104
views
For a refactoring tool, are I/O operations part of the core domain?
I'm working on a refactoring tool that makes necessary adjustments to a Rust project when moving a source file from one location to another.
Quick Explanation
In Rust, source files are known as "...
0
votes
2
answers
203
views
Outside-in v. inside-out development in regard to DDD & BDD
BDD advocates for outside-in development because having a clear goal for your code helps you avoid getting bogged down in unnecessary details. It is usually mentioned in the same breath as DDD, but I'...
-1
votes
1
answer
293
views
Reusing simple BDD testing for more complex test scenarios
I am currently learning about BDD (Cucumber/Gherkin) in test automation. I am wondering about reusing simpler test scenarios or step definitions for more complex scenarios. Specifically, I am working ...
11
votes
4
answers
3k
views
Should you define acceptance tests for vital yet simple behavior?
I'm trying to practice BDD by applying it to a simple problem—in this case, the flocking algorithm, better known as "boids".
Before any of the rules (cohesion, alignment, etc.) comes the ...
0
votes
2
answers
228
views
Can BDD acceptance criteria format (Given - When - Then) be used for technical debt or tasks?
Behavior-driven development is meant to be used at the business/user level.
However, I find the keywords "Given - When - Then" a good format for technical stories as well, but I am very ...
2
votes
2
answers
700
views
Does the "Pyramid of tests" contradict the idea of tests focusing on behaviour?
I am talking about these two testing strategies :
Have a pyramid of tests (with many more unit tests than high-level tests), because high level tests are harder to maintain and slower (see also : ...
9
votes
5
answers
3k
views
Do test-driven and behavior-driven development belong to the "verification" category?
In university, we were introduced to the two terms "verification" and "validation". The definitions can be summarized as follows:
Validation checks that the specifications and ...
2
votes
2
answers
336
views
How would I use TDD / BDD when my webapp interacts with an external REST API?
I'm following roughly the TDD style as explained in the "Obey the Testing Goat" book: You have a functional test for your (Django, in my case) web app that tests the observable behaviour via ...
0
votes
2
answers
357
views
What is the best practice for BDD?
The web application I am working on is currently (partially) tested automatically.
All scenarios are hardcoded in custom code in this way :
WebElement bt = findButtonWithLabel("foo")
bt....
1
vote
1
answer
120
views
Behavior Driven Development - How to test "notification" step
I'm implementing the steps of a feature with Specflow and I have a problem with one of the steps.
Here is the Scenario :
Scenario: Cancel a yearly running subscription after legal retractation
...
5
votes
4
answers
506
views
How can Behavior-Driven Development be a form of Testing-Driven Development/Unit Testing?
When looking and Behavior-Driven development, "Behavior-driven development is an extension of test-driven development" (From Wikipedia). Researching around various articles, behavior-driven ...
49
votes
8
answers
15k
views
How do I really write tests without mocking/stubbing?
I have been using TDD when developing some of my side projects and have been loving it.
The issue, however, is that stubbing classes for unit tests is a pain and makes you afraid of refactoring.
I ...
-3
votes
1
answer
398
views
Springboot (Java) - Is mandatory for BDD the use of Cucumber?
I was wondering if its a requirement to consider BDD the use of Cucumber framework or other framework of test abstraction.
Because I was playing around with @SpringbootTest and TestContainers(both ...
1
vote
2
answers
369
views
Should a BDD feature be implemented by a one (and only one) clean architecture interactor?
TL; DR
Given BDD documentation with features composed by several scenarios, should we:
Create a single interactor per feature
Create minor interactors per scenario, and composing the feature ...
1
vote
2
answers
841
views
How to convert from TDD scripts to BDD?
There are TDD automation scripts ready and running. TDD tests are written in granular level(class, functions, module) and BDD is written in Behavior level. Is it feasible convert this TDD script to ...
1
vote
1
answer
129
views
Benefits of using BDD in an open source project
The benefits of Behavior Driven Development (BDD) seem to be that non-technical stakeholders are more easily included in the writing of requirements/user stories.
In an open-source project, most ...
1
vote
2
answers
190
views
In BDD - How do I automate tests up front for things that don't exist YET
My team is just starting with BDD, and we are learning to write scenarios in a GIVEN, WHEN, THEN format. This will position us to start to automate our tests (with selenium) at the start of sprint, ...
-2
votes
1
answer
280
views
Documenting business logics of legacy application having no unit test
I have joined a team in company and this team owns few services, which are used widely by many other user facing internal/external UI apps and other internal apis.
My manager gave me rough idea that ...
1
vote
1
answer
657
views
Applying BDD accross multiple microservices
I'm involved in a microservices based application. I'm trying to apply the BDD process for this. I need a recommendation how to apply this process correctly given this type of architecture. It is ...
1
vote
5
answers
5k
views
For BDD, should the step to wait be explicit in the feature file or just implemented in the step?
I'm using BDD and I'm writing Gherkin feature files.
Is it good practice to add a step in a Scenario to wait for a while?
Something like:
Waits for 2 seconds after all the operations complete
or ...
-3
votes
1
answer
171
views
How exactly am I supposed to test business expectations?
I have been looking at BDD but there is something that keeps confusing me. Consider this user story:
Given a user has placed their order
And the payment was accepted
Then a confirmation email should ...
0
votes
1
answer
252
views
Gherkin Syntax and Unit Specification
I am wondering about the Gherkin syntax for some scenarios. Suppose I have following events A, B{1}, B{2}, C, D1, D2, G.
Where uppercase{number} events like B1, D2 are parallel events(simultaneous).
...
3
votes
2
answers
366
views
TDD how to avoid test duplication across team
Our team has decided to develop using BDD/TDD in an effort to become the Agile team we're supposed to be. Vertical slicing appears to be an important part of agile working and gaining the quick ...
2
votes
1
answer
313
views
Should BDD/Gherkin be used only for user visible behaviour?
We're a small team of 3 senior and 1 junior developers and I've been tasked with introducing BDD within our development process.
To say there's a lot of confusion about BDD is an understatement and ...
20
votes
7
answers
5k
views
Is it a good idea to write all possible test cases after transforming the team to TDD to achieve a full coverage?
Assume we have a large enterprise-level application without any unit/functional tests. There was no test-driven development process during the development due to very tight deadlines (I know we should ...
-2
votes
1
answer
191
views
How can I unit test this code [closed]
How can I unit test a codebase which contains classes that includes two or three methods. In general these methods are too long. The methods contain lots of tasks like filtering datasets and a ...
1
vote
1
answer
52
views
BDD Scenario Argument Resolution - file type is a prerequisite input to the scenario
I have to sympathetically resolve a debate internally. Take this scenario, it's not perfect but bear with me.
As Arthur
I want to upload multiple lists of appointment data during
the day
...
1
vote
2
answers
424
views
BDD process for SAP development
Perhaps this story should be titled "BDD definitions for agile service stories"...
For our .NET-based stories (always vertical slices) we use definitions matching the well known BDD format.
...
6
votes
4
answers
2k
views
How to do BDD for CRUD?
I want to understand how Behavior-Driven Development (BDD) can be applied to building CRUD applications.
I have read a lot on the subject but I just don't get how I'm supposed to apply it. I learn ...
0
votes
1
answer
203
views
Client-Side TDD Tests?
More specifically, with regards to ATDD (sort of BDD flavored, or some could argue what was actually intended in the first place by TDD) should be there much UI testing?
As I have been testing my UI ...
1
vote
1
answer
120
views
Testing Client-Side Code w/o Introducing Brittleness
I'm finding it tough to test my client-side code without testing implementation details.
For example, lets say you are testing a login form that displays client-side validation errors and does not ...
1
vote
1
answer
165
views
Test RESTful APIs?
When testing RESTful JSON APIs with ATDD/BDD practices in mind is it good practice to test the structure of the response?
I'm thinking that it could too easily change, thus making for a brittle test. ...
-3
votes
1
answer
94
views
What constitutes AGILITY where Behavior-Driven and Unit Testing are concerned
This morning I had a presentation on PHPSPec which the official website describes as follows:
A php toolset to drive emergent design by specification.
As defined within an adjective context the word ...
2
votes
1
answer
1k
views
Second step of BDD - write "failing scenario step", does it mean the test for it?
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....
-1
votes
1
answer
73
views
Testing Application Helper that Depends on Controller
I am working on practicing TDD/BDD/ATDD and I am working on a rails application.
I created a helper method that depends conditionally on the type of controller being tested.
module ApplicationHelper
...
1
vote
1
answer
97
views
Worth it to test client side element presence for web application?
I've really been focusing on making my tests maintainable by focusing on BDD-style tests and only focusing on interfaces. I do not want my tests to be brittle and prevent refactoring.
Is it worth it ...
2
votes
1
answer
309
views
Should BDD scenario be as minimal as possible, or is doing multiple cases in them okay?
Suppose were testing line segment intersections, and the intersections consider parallel and collinear lines to never intersect. Which one would be more natural to write?
One case has more jammed ...
-1
votes
1
answer
538
views
Using BDD and DDD approaches, which seem to complement and contradict each other
I am trying to apply BDD and DDD together to a new project The problem I am having at the moment can be summed up by the following quote (taken from here: https://www.infoq.com/news/2015/02/bdd-ddd):
...
1
vote
3
answers
266
views
Should an imperative style be used if the parameters drive the outcome?
I have done a lot of BDD reading since the beginning of the weekend. At the moment I am reading about the imperative style v the declarative style. The imperative style is often described as an anti ...
1
vote
1
answer
450
views
Have I understood the term Honeycomb correctly?
Following on from my previous question and the comments under the accepted answer: One Acceptance Test project per layer or one Acceptance Test project per Bounded Context
I have done a lot of ...
-1
votes
1
answer
530
views
One Acceptance Test project per layer or one Acceptance Test project per Bounded Context
This link (http://www.taimila.com/blog/ddd-and-testing-strategy/) says: "Feature tests should depend only on the application layer" i.e. presentation layer.
I am trying to understand how BDD fits in ...
0
votes
1
answer
117
views
Does changing a Specflow scenario after it is written violate the open close principle?
I am trying to learn Specflow. I have bought a book and it arrives at the weekend. Most of the scenarios I see online are for simple things like calculators. For example, please see the scenario ...
0
votes
2
answers
187
views
Testing a class that only has one field only that is an ID number
I am trying to incorporate BDD into the teams working practices to make interactions with Business Analysts more effective. I recently asked this question: Should I pass an ID number from the feature ...
0
votes
3
answers
1k
views
Should I pass an ID number from the feature file?
Say I have a domain object like this:
public class Customer
{
private Guid _id;
private string _name;
private Address _address;
public Customer (Guid id, string name, Address address)...
12
votes
4
answers
6k
views
What levels to test on with BDD/Cucumber?
I'm currently getting into BDD/Cucumber and I ask myself: On which levels is it good to use?
There are the test levels (from the testing pyramid):
User Interface
Integration
Unit
You can apply tests ...
1
vote
1
answer
4k
views
Testing a private method in Java [duplicate]
I am new writing good test cases, so please bear with me. Writing a test case for private methods
public Stock getStock(String stockTicker) {
Stock company = new Stock();
...
2
votes
1
answer
552
views
Where should I do integration tests in a multi package project
Background:
I am working on a node project which consists of a core package and several addon packages. For the end product to work, the core package and atleast one of the addon packages should be ...
0
votes
1
answer
1k
views
What is the difference between Traditional Software Development and Behavior Driven Development?
What is the difference between so called Traditional Software Development (TSD) and Behavior Driven Development (BDD)?
I've seen a lot of different development methods that teach developers to talk ...
9
votes
3
answers
720
views
How does Behavior Driven Development improves clarity when natural languages are ambiguous?
I'm currently exploring BDD test frameworks like cucumber and I find it curious when people say
since the feature files are in simple natural language it improves
clarity and gives a clear vision
...