BDD in open source projects - Is it really beneficial?
-
Upload
fabian-kiss -
Category
Technology
-
view
3.629 -
download
2
description
Transcript of BDD in open source projects - Is it really beneficial?
![Page 1: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/1.jpg)
BDD in open-source projectsIs it really beneficial?
FABIAN KISS
![Page 2: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/2.jpg)
I AM
Fabian Kiss@head_revision
Passionate Behat user, contributor, and blogger
headrevision
![Page 3: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/3.jpg)
I WORK AT
![Page 4: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/4.jpg)
WE ARE HERE@ymc_ch
www.ymc.ch
![Page 5: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/5.jpg)
I WILL
Question BDD!
![Page 6: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/6.jpg)
I WILL
Question BDD!
Dan North: « BDD is a [...] multiple-stakeholder, agile methodology »
![Page 7: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/7.jpg)
I WILL
BDD is beneficial in agile customer projects.
Dan North: « BDD is a [...] multiple-stakeholder, agile methodology »
Question BDD!
![Page 8: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/8.jpg)
I WILL
BDD is beneficial in agile customer projects.
Dan North: « BDD is a [...] multiple-stakeholder, agile methodology »
Question BDD!
customer pays→ explicit customer→ agile process
![Page 9: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/9.jpg)
I WILL
BDD is beneficial in agile customer projects.
Dan North: « BDD is a [...] multiple-stakeholder, agile methodology »
Question BDD!
open-source projects
customer pays→ explicit customer→ agile process
developers work for free→ no explicit customer→ emergent process
![Page 10: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/10.jpg)
I WILL
BDD is beneficial in agile customer projects. customer pays→ explicit customer→ agile process
Dan North: « BDD is a [...] multiple-stakeholder, agile methodology »
developers work for free→ no explicit customer→ emergent process
Question BDD!
Is it beneficial in as well?open-source projects
![Page 11: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/11.jpg)
![Page 12: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/12.jpg)
PRIME EXAMPLE
![Page 13: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/13.jpg)
USES
PRIME EXAMPLE
BOTH TOOLS
![Page 14: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/14.jpg)
![Page 15: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/15.jpg)
TOOLSBDD IS NOT ABOUT
![Page 16: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/16.jpg)
TOOLSBDD IS NOT ABOUT
METHODOLOGYBDD IS ABOUT
![Page 17: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/17.jpg)
TOOL
![Page 18: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/18.jpg)
TOOL
METHOD SpecBDD StoryBDD
![Page 19: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/19.jpg)
TOOL
SYNTAX
METHOD SpecBDD StoryBDD
Code, Functions/Methods as specifications
![Page 20: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/20.jpg)
TOOL
SYNTAX
METHOD SpecBDD StoryBDD
function it_greets_with_hello_world(){ $this->greet()->shouldReturn( 'Hello World' );}
![Page 21: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/21.jpg)
TOOL
SYNTAX
METHOD SpecBDD StoryBDD
Plain text, one or more scenarios for (fictitious) user story, described as prose in given-when-then scheme (Gherkin syntax)
function it_greets_with_hello_world(){ $this->greet()->shouldReturn( 'Hello World' );}
![Page 22: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/22.jpg)
TOOL
SYNTAXfunction it_greets_with_hello_world(){ $this->greet()->shouldReturn( 'Hello World' );}
Scenario: A successful scenario Given a precondition When an event occurred Then an outcome is achieved
METHOD SpecBDD StoryBDD
![Page 23: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/23.jpg)
TOOL
NOTION
SYNTAXfunction it_greets_with_hello_world(){ $this->greet()->shouldReturn( 'Hello World' );}
Scenario: A successful scenario Given a precondition When an event occurred Then an outcome is achieved
Dan North 2003:
names of test methods describe intended behavior
METHOD SpecBDD StoryBDD
![Page 24: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/24.jpg)
TOOL
NOTION
SYNTAX
“TDD done right”
function it_greets_with_hello_world(){ $this->greet()->shouldReturn( 'Hello World' );}
Scenario: A successful scenario Given a precondition When an event occurred Then an outcome is achieved
METHOD SpecBDD StoryBDD
![Page 25: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/25.jpg)
Should you use SpecBDD as substitute for xUnit?
QUESTION #1
![Page 26: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/26.jpg)
Should you use SpecBDD as substitute for xUnit?
phpspec PHPUnit
QUESTION #1
![Page 27: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/27.jpg)
no problem in principalPROJECT
CUSTOMER
Should you use SpecBDD as substitute for xUnit?
phpspec PHPUnit
QUESTION #1
![Page 28: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/28.jpg)
no problem in principalPROJECT
CUSTOMER
PROJECTOPEN-SOURCE community developers unfamiliar with the code might be irritated
Should you use SpecBDD as substitute for xUnit?
phpspec PHPUnit
QUESTION #1
![Page 29: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/29.jpg)
no problem in principalPROJECT
CUSTOMER
PROJECTOPEN-SOURCE community developers unfamiliar with the code might be irritated
“Where are the unit tests?”“How to unit test with that?”
Should you use SpecBDD as substitute for xUnit?
phpspec PHPUnit
QUESTION #1
![Page 30: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/30.jpg)
no problem in principalPROJECT
CUSTOMER
PROJECTOPEN-SOURCE community developers unfamiliar with the code might be irritated
“Where are the unit tests?”“How to unit test with that?”
Should you use SpecBDD as substitute for xUnit?
phpspec PHPUnit
QUESTION #1
![Page 31: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/31.jpg)
TOOL
NOTION
SYNTAX
“TDD done right”
function it_greets_with_hello_world(){ $this->greet()->shouldReturn( 'Hello World' );}
Scenario: A successful scenario Given a precondition When an event occurred Then an outcome is achieved
?
METHOD SpecBDD StoryBDD
![Page 32: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/32.jpg)
TOOL
NOTION
SYNTAX
“TDD done right”
function it_greets_with_hello_world(){ $this->greet()->shouldReturn( 'Hello World' );}
Scenario: A successful scenario Given a precondition When an event occurred Then an outcome is achieved
Dan North 2011:
« BDD is about understanding the customer's need [...] (and being able to prove that with an evolving suite of acceptance tests) »
METHOD SpecBDD StoryBDD
![Page 33: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/33.jpg)
TOOL
NOTION
SYNTAX
“TDD done right”
function it_greets_with_hello_world(){ $this->greet()->shouldReturn( 'Hello World' );}
Scenario: A successful scenario Given a precondition When an event occurred Then an outcome is achieved
understanding customer’s need + evolving suite of acceptance tests
METHOD SpecBDD StoryBDD
![Page 34: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/34.jpg)
STORYBDD IN DETAIL
![Page 35: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/35.jpg)
STORYBDD IN DETAIL
implementing something correctly && implementing the right thing
![Page 36: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/36.jpg)
STORYBDD IN DETAIL
implementing something correctly && implementing the right thing
acceptance tests are secondary to the understanding
![Page 37: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/37.jpg)
STORYBDD IN DETAIL
implementing something correctly && implementing the right thing
acceptance tests are secondary to the understanding
customer explicitly asks for their production && co-produces them
![Page 38: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/38.jpg)
STORYBDD IN DETAIL
implementing something correctly && implementing the right thing
acceptance tests are secondary to the understanding
customer explicitly asks for their production && co-produces them
![Page 39: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/39.jpg)
Who decides what the right thing is?
QUESTION #2
![Page 40: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/40.jpg)
customer, thus no problemPROJECT
CUSTOMER
Who decides what the right thing is?
QUESTION #2
![Page 41: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/41.jpg)
customer, thus no problemPROJECT
CUSTOMER
PROJECTOPEN-SOURCE developer, thus potential problem
Who decides what the right thing is?
QUESTION #2
![Page 42: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/42.jpg)
customer, thus no problemPROJECT
CUSTOMER
PROJECTOPEN-SOURCE developer, thus potential problem
customer === (other) developers (i.e. bundle level) → no problemelsewise (i.e. application level) → “language of the customer” is not met
Who decides what the right thing is?
QUESTION #2
![Page 43: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/43.jpg)
customer, thus no problemPROJECT
CUSTOMER
PROJECTOPEN-SOURCE developer, thus potential problem
customer === (other) developers (i.e. bundle level) → no problemelsewise (i.e. application level) → “language of the customer” is not met
Who decides what the right thing is?
QUESTION #2
![Page 44: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/44.jpg)
STORYBDD IN DETAIL
implementing something correctly && implementing the right thing
acceptance tests are secondary to the understanding
customer explicitly asks for their production && co-produces them
![Page 45: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/45.jpg)
How to facilitate understanding?
QUESTION #3
![Page 46: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/46.jpg)
face-to-face communication, thus no problemPROJECT
CUSTOMER
How to facilitate understanding?
QUESTION #3
![Page 47: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/47.jpg)
face-to-face communication, thus no problemPROJECT
CUSTOMER
PROJECTOPEN-SOURCE communication mainly via issue tracker. pull requests, Twitter, etc.
→ StoryBDD is impeded
How to facilitate understanding?
QUESTION #3
![Page 48: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/48.jpg)
face-to-face communication, thus no problemPROJECT
CUSTOMER
PROJECTOPEN-SOURCE communication mainly via issue tracker. pull requests, Twitter, etc.
→ StoryBDD is impeded→ but StoryBDD is the solution
How to facilitate understanding?
QUESTION #3
![Page 49: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/49.jpg)
face-to-face communication, thus no problemPROJECT
CUSTOMER
PROJECTOPEN-SOURCE communication mainly via issue tracker. pull requests, Twitter, etc.
→ StoryBDD is impeded→ but StoryBDD is the solution
(watching the execution of the Behat suite live in a browser facilitates your understanding about the features of the open-source project)
How to facilitate understanding?
QUESTION #3
![Page 50: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/50.jpg)
face-to-face communication, thus no problemPROJECT
CUSTOMER
PROJECTOPEN-SOURCE communication mainly via issue tracker. pull requests, Twitter, etc.
→ StoryBDD is impeded→ but StoryBDD is the solution
(watching the execution of the Behat suite live in a browser facilitates your understanding about the features of the open-source project)
How to facilitate understanding?
QUESTION #3
(but browser is emulated so far)
![Page 51: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/51.jpg)
STORYBDD IN DETAIL
implementing something correctly && implementing the right thing
acceptance tests are secondary to the understanding
customer explicitly asks for their production && co-produces them
![Page 52: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/52.jpg)
Who asks for their production?
QUESTION #4
![Page 53: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/53.jpg)
customer, thus no problemPROJECT
CUSTOMER
Who asks for their production?
QUESTION #4
![Page 54: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/54.jpg)
customer, thus no problemPROJECT
CUSTOMER
PROJECTOPEN-SOURCE (some) community developers, thus potential problem
Who asks for their production?
QUESTION #4
![Page 55: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/55.jpg)
customer, thus no problemPROJECT
CUSTOMER
PROJECTOPEN-SOURCE (some) community developers, thus potential problem
StoryBDD might be process overhead → more impediment than benefit
Who asks for their production?
QUESTION #4
![Page 56: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/56.jpg)
customer, thus no problemPROJECT
CUSTOMER
PROJECTOPEN-SOURCE (some) community developers, thus potential problem
StoryBDD might be process overhead → more impediment than benefit
“The code doesn’t get green anymore!”“If the worst comes to the worst, who decides to abandon Behat?”
Who asks for their production?
QUESTION #4
![Page 57: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/57.jpg)
customer, thus no problemPROJECT
CUSTOMER
PROJECTOPEN-SOURCE (some) community developers, thus potential problem
StoryBDD might be process overhead → more impediment than benefit
“The code doesn’t get green anymore!”“If the worst comes to the worst, who decides to abandon Behat?”
Who asks for their production?
QUESTION #4
(at early development stage)
![Page 58: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/58.jpg)
CONCLUSION
![Page 59: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/59.jpg)
CONCLUSION
![Page 60: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/60.jpg)
CONCLUSION
SpecBDD might benefit open-source projects.
![Page 61: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/61.jpg)
CONCLUSION
SpecBDD might benefit open-source projects.
StoryBDD might benefit open-source projects.
![Page 62: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/62.jpg)
CONCLUSION
SpecBDD might benefit open-source projects.
StoryBDD might benefit open-source projects.(even more than customer projects)
![Page 63: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/63.jpg)
CONCLUSION
SpecBDD might benefit open-source projects.
StoryBDD might benefit open-source projects.(even more than customer projects)
StoryBDD might impede open-source projects.
![Page 64: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/64.jpg)
CONCLUSION
SpecBDD might benefit open-source projects.
StoryBDD might benefit open-source projects.(even more than customer projects)
StoryBDD might impede open-source projects.
What to do?
![Page 65: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/65.jpg)
CONCLUSION
SpecBDD might benefit open-source projects.
StoryBDD might benefit open-source projects.(even more than customer projects)
StoryBDD might impede open-source projects.
What to do?
Contribute!
![Page 66: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/66.jpg)
CONCLUSION
SpecBDD might benefit open-source projects.
StoryBDD might benefit open-source projects.(even more than customer projects)
StoryBDD might impede open-source projects.
e.g.
What to do?
Contribute!
![Page 67: BDD in open source projects - Is it really beneficial?](https://reader033.fdocuments.us/reader033/viewer/2022051411/5456c79db1af9f37608b4dde/html5/thumbnails/67.jpg)
QUESTIONS?
Quotes:Slide 06: How to sell BDD to the business by Dan NorthSlide 32: Defining BDD by Dan North
Photo Credits:Slide 01: off to save something by bokeh burgerSlide 04: Alpkäse, Aeschi bei Spiez by Time.CapturedSlide 12: Background image by SyliusSlide 15: Swiss Army by Jim PennucciSlide 58: Vancouver Symphony Orchestra with Bramwell Tovey by Vancouver 125
@head_revision
www.ymc.ch