Recently I was working with Behavior Driven Development approach in Rails using RSpec
and Capybara
. Everything looks okay and it even can speed up whole planning-development bridge in my work (by defining closely behavior of app than usual specification documentation). Anyway, here is my though: is BDD so cool why there is no version control workflow for it? Here is my thought:
Rationale
BDD usually contains two things of each feature:
- described test
- implementation
That means there are two entities of each feature - dependent to build full-feature, but separated physically. Moreover, the standard procedure (also known as cycle) of building each feature contains:
- Write behavioral tests
- Write implementation
Although there is no implementation of this proccess in version control, I question the Internet why and there wasn't any response.
Proposition
Assume that there are three types of branches:
- master (or some kind of dev branch)
- wish
- implementation (those two will be described later)
Wish
BDD covers planning process by adding some tests of particular feature before writing code and let them fail. Why just separate this process in branch and tell that is wish how software should work. For example, there is a wish_A
branch with particular (based on the RSpec
) feature test. This branch is just for developing the test scenario for feature at once.
Implementation
It is natural that each wish should become working code eventually. So this is the way of implementing behavior - by branching wish_A
and implementing there a working code. By the last word of lifecycle, the implementation branch is merged into dev
or master
or any opther version/codename branch.
Issues
Dependency issues
Each wish
branch can be depends on many other wishes. Assume that:
A_wish
andB_wish
are basic, independent featuresAB_wish
requiresA_wish
andB_wish
fuctionallity
I can't figure what problems might occur after branching from one of A
or B
and merging another. Implementation of those wishes should be similar - with some conflicts or other problems of code's tech nature.
Question
I can't find why this is not implemented by some software-development approach or why it won't work with BDD. Are there particular reasons for not doing some kind of generic approach?