Behavior Driven Development for Plugin Writers - AtlasCamp 2011
-
Upload
atlassian -
Category
Technology
-
view
106 -
download
0
description
Transcript of Behavior Driven Development for Plugin Writers - AtlasCamp 2011
![Page 1: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/1.jpg)
![Page 2: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/2.jpg)
... and giving your tests to Atlassian to run?!
BDD for plugin writers
2
Josh GrahamSaaS Architect, [email protected]
@delitescere
![Page 3: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/3.jpg)
3
Plugins are awesome
![Page 4: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/4.jpg)
Plugins are challenging
4
![Page 5: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/5.jpg)
Plugins are rewarding
5
![Page 6: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/6.jpg)
Easier
6
![Page 7: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/7.jpg)
Safer
7
![Page 8: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/8.jpg)
BDD
8
Behavior Driven Development
![Page 9: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/9.jpg)
![Page 10: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/10.jpg)
#atlascamp @delitescere
Overheard
BDD=
TDD+
natural domain language ”
10
“
![Page 11: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/11.jpg)
#atlascamp @delitescere
Overheard
BDD
=
Conversations that
create software
”
11
“
![Page 12: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/12.jpg)
Outside-in
12
![Page 13: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/13.jpg)
Collaboration
13
Business Owner
DeveloperQA
User
![Page 14: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/14.jpg)
• Devs• BAs• QAs• Business Sponsors• Tech Writers• Users• Support
• other systems, units of code...
Stakeholders
14
![Page 15: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/15.jpg)
BDD is as much about the interactions between the
various people in the project as it is about the
outputs of the development process
Dan North, BDDiddy
15
“
”
![Page 16: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/16.jpg)
If you’re not having conversations, you’re not
doing BDD.
Liz Keogh, BDDiva”
“
16
![Page 17: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/17.jpg)
Traceability
17
Given an issue existsAnd that issue is in the Open state
When I perform the Close action on that issue
Then that issue is in the Closed state
class Issue {
public Issue transition(Action action) {
currentState = workflow.transition(this, action);
}
}
![Page 18: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/18.jpg)
Business Outcomes
18
![Page 19: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/19.jpg)
• Executable specification of system behavior• Easily find regressions• Test forward / backward compatibility• Atlassian can run your tests?!
Plugin Developers
19
![Page 20: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/20.jpg)
20
![Page 21: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/21.jpg)
• Given / When / Then• Abstract
• Domain’s ubiquitous language• Page Objects (if available)• HTML
• A result of conversations
BDD
21
![Page 22: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/22.jpg)
• Consumer-Driven Contracts –Ian S. Robinson
• A new approach to integration• Apply to plugins• Atlassian runs your tests?!
Consumers rule!
22
![Page 23: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/23.jpg)
The Contract
23
![Page 24: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/24.jpg)
Sharing a contract repo
Atlassian.git
Your Plugin.git
Contract.git
submodule submodule
![Page 25: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/25.jpg)
Commit tests
Atlassian.git
Your Plugin.git
Contract.git
submodule submodule
![Page 26: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/26.jpg)
Negotiate contract
Atlassian.git
Your Plugin.git
Contract.git
submodule submodule
![Page 27: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/27.jpg)
Check contract violation
Atlassian.git
Your Plugin.git
Contract.git
submodule submodule
![Page 28: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/28.jpg)
Commit changed tests
Atlassian.git
Your Plugin.git
Contract.git
submodule submodule
![Page 29: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/29.jpg)
Renegotiate contract
Atlassian.git
Your Plugin.git
Contract.git
submodule submodule
![Page 30: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/30.jpg)
Custom plugins?
30
![Page 31: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/31.jpg)
#atlascamp @delitescere
Overheard
1) Have a conversation with your users about how
the plugin should behave
2) Write it as a spec
3) Give it to us
“
”
31
![Page 33: Behavior Driven Development for Plugin Writers - AtlasCamp 2011](https://reader033.fdocuments.in/reader033/viewer/2022051515/54c7231a4a7959e16f8b45f2/html5/thumbnails/33.jpg)
✴Object Design bookhttp://www.amazon.com/Object-Design-Roles-Responsibilities-Collaborations/dp/0201379430
✴Domain Driven Design sitehttp://www.domaindrivendesign.org
✴Using Mocks and Tests To Design Role-Based Objects articlehttp://static.mockobjects.com/files/usingmocksandtests.pdf
✴ Introducing BDD bloghttp://dannorth.net/introducing-bdd/
✴Consumer-Driven Contracts articlehttp://martinfowler.com/articles/consumerDrivenContracts.html andhttp://iansrobinson.com/category/consumer-driven-contracts/
✴Rest In Practice sitehttp://restinpractice.com/
33