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
106 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/...
0 votes
2 answers
201 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 ...
2 votes
2 answers
699 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 : ...
2 votes
2 answers
335 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 ...
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 ...
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 ...
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 ...