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
173
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
votes
1
answer
338
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 ...
1
vote
0
answers
108
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
234
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'...
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
253
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 ...
50
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 ...
2
votes
2
answers
737
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 : ...
25
votes
4
answers
24k
views
How to use unit tests when using BDD?
I am trying to understand BDD. I've read some articles and as I understood BDD is "the next step" from TDD.
I say that because I find both to be very similar, and as I could read in this ...
5
votes
4
answers
530
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 ...
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 ...
10
votes
3
answers
1k
views
Boundaries of unit testing between my code and a library or sub-component
Background: I am new to testing in general, and have been studying it in context of JavaScript, specifically React.js, front-end development (actually new to this as well). For the question, I have ...
2
votes
2
answers
362
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
398
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....
30
votes
3
answers
28k
views
Differences between Given When Then (GWT) and Arrange Act Assert (AAA)?
In TDD there is Arrange Act Assert (AAA) syntax:
[Test]
public void Test_ReturnItemForRefund_ReturnsStockOfBlackSweatersAsTwo_WhenOneInStockAndOneIsReturned()
{
//Arrange
ShopStock shopStock =...