behaviour-driven development of foundational uml components · behavior driven development (bdd)...
TRANSCRIPT
![Page 1: Behaviour-Driven Development of Foundational UML Components · Behavior Driven Development (BDD) FESCA 2010 User Story/ Scenario Customer Developer Business expert Arhitect Define](https://reader033.vdocuments.net/reader033/viewer/2022042620/5f43da644fa98e79a323cd05/html5/thumbnails/1.jpg)
Behaviour-Driven Development ofFoundational UML Components
I.Lazar, S. Motogna. B. ParvDepartment of Computer Science
Babes-Bolyai University
Cluj-Napoca, Romania
FESCA 2010
![Page 2: Behaviour-Driven Development of Foundational UML Components · Behavior Driven Development (BDD) FESCA 2010 User Story/ Scenario Customer Developer Business expert Arhitect Define](https://reader033.vdocuments.net/reader033/viewer/2022042620/5f43da644fa98e79a323cd05/html5/thumbnails/2.jpg)
Behavior Driven Development (BDD)
FESCA 2010
User Story/
Scenario
Customer
Developer
Businessexpert
Arhitect
Define requirements
Attach examples
Implement behavior
Principle: common language for system behavior specification
Principle: any system – identified, verifiable value to the business
ExecutableScenarios
![Page 3: Behaviour-Driven Development of Foundational UML Components · Behavior Driven Development (BDD) FESCA 2010 User Story/ Scenario Customer Developer Business expert Arhitect Define](https://reader033.vdocuments.net/reader033/viewer/2022042620/5f43da644fa98e79a323cd05/html5/thumbnails/3.jpg)
Concepts in BDD
FESCA 2010
![Page 4: Behaviour-Driven Development of Foundational UML Components · Behavior Driven Development (BDD) FESCA 2010 User Story/ Scenario Customer Developer Business expert Arhitect Define](https://reader033.vdocuments.net/reader033/viewer/2022042620/5f43da644fa98e79a323cd05/html5/thumbnails/4.jpg)
BDD activities as user stories
Requirementsanalysis
US1. Users add new stories to a projectUS2. Users add new scenarios to a story
Project Planning US3. Users add new iterations to a projectUS4. Users allocate stories to iterationsUS5. Developers accept stories
Development iteration
US6. Developers implement storiesUS7. Update iteration status after scenario executionUS8. Update project progress after scenario execution
Verifiable progress
US9. Users can obtain iteration status reportsUS10. Users can obtain project status reports
FESCA 2010
![Page 5: Behaviour-Driven Development of Foundational UML Components · Behavior Driven Development (BDD) FESCA 2010 User Story/ Scenario Customer Developer Business expert Arhitect Define](https://reader033.vdocuments.net/reader033/viewer/2022042620/5f43da644fa98e79a323cd05/html5/thumbnails/5.jpg)
Agile project planning
<<Scenario>>Verify story initialization
<<Scenario>>Estimate a project containing two estimated stories
<<Scenario>>Estimate a project containing an estimated story
<<Story>>Add newstories toa project{id = "US1" }
FESCA 2010
![Page 6: Behaviour-Driven Development of Foundational UML Components · Behavior Driven Development (BDD) FESCA 2010 User Story/ Scenario Customer Developer Business expert Arhitect Define](https://reader033.vdocuments.net/reader033/viewer/2022042620/5f43da644fa98e79a323cd05/html5/thumbnails/6.jpg)
Scenario description
• given "a project"
• when "a new story is created"
• then "story status should be defined" and "project should include story"
(a) Verify story initialization
• given "a project" and "two new stories"
• when "both stories have estimates"
• then "project estimate = story estimates"
(b) Estimate project =
2 estimated stories
• given "a project" and "a new story"
• when "the story is estimated"
• then "the project estimate = story estimate"
(c) Estimate project = estimated story
FESCA 2010
![Page 7: Behaviour-Driven Development of Foundational UML Components · Behavior Driven Development (BDD) FESCA 2010 User Story/ Scenario Customer Developer Business expert Arhitect Define](https://reader033.vdocuments.net/reader033/viewer/2022042620/5f43da644fa98e79a323cd05/html5/thumbnails/7.jpg)
Research problem
• BDD approach for developing executable fUML components
• fUML defines implementation-oriented abstractions - refer to Platform Independent Models (PIM).
• Refer only structural and behavioral constructs defined by the fUML specification
• tailored to the algorithmic and data-intensive types of programs
• concrete textual syntax is needed - enforces a certain way of constructing models
• generated code is meant to be complete
FESCA 2010
![Page 8: Behaviour-Driven Development of Foundational UML Components · Behavior Driven Development (BDD) FESCA 2010 User Story/ Scenario Customer Developer Business expert Arhitect Define](https://reader033.vdocuments.net/reader033/viewer/2022042620/5f43da644fa98e79a323cd05/html5/thumbnails/8.jpg)
Solution – consists of:
UML profile
Library fUML activities – equality & inclusion
Activities – executable scenarios
Concrete syntax for BDD scenarios
bUML – BDD tool for fUML models
FESCA 2010
![Page 9: Behaviour-Driven Development of Foundational UML Components · Behavior Driven Development (BDD) FESCA 2010 User Story/ Scenario Customer Developer Business expert Arhitect Define](https://reader033.vdocuments.net/reader033/viewer/2022042620/5f43da644fa98e79a323cd05/html5/thumbnails/9.jpg)
BDD profileReturn Verdict:
pass, fail, inconclusive, error
inconclusive
FESCA 2010
![Page 10: Behaviour-Driven Development of Foundational UML Components · Behavior Driven Development (BDD) FESCA 2010 User Story/ Scenario Customer Developer Business expert Arhitect Define](https://reader033.vdocuments.net/reader033/viewer/2022042620/5f43da644fa98e79a323cd05/html5/thumbnails/10.jpg)
Scenario descriptiontextual & graphical representation
FESCA 2010
• given "a project"
• when "a new story is created"
• then "story status should be defined" and "project should include story"
![Page 11: Behaviour-Driven Development of Foundational UML Components · Behavior Driven Development (BDD) FESCA 2010 User Story/ Scenario Customer Developer Business expert Arhitect Define](https://reader033.vdocuments.net/reader033/viewer/2022042620/5f43da644fa98e79a323cd05/html5/thumbnails/11.jpg)
Scenario implementation
Difficulties:
Implement scenario – return verdict
fUML primitives – low level
Implement scenario – complex
how fUML define behavior of methods
then part of scenario
Testing equality and inclusions
FESCA 2010
![Page 12: Behaviour-Driven Development of Foundational UML Components · Behavior Driven Development (BDD) FESCA 2010 User Story/ Scenario Customer Developer Business expert Arhitect Define](https://reader033.vdocuments.net/reader033/viewer/2022042620/5f43da644fa98e79a323cd05/html5/thumbnails/12.jpg)
Scenario implementation
Textual representationgiven "a project", { project = new Project }when "a new story is created", { story = project.createStory() }then “story status should be defined", { story.status shouldBe StoryStatus.Defined }and “project should include the story", { project.story shouldInclude story }
FESCA 2010
![Page 13: Behaviour-Driven Development of Foundational UML Components · Behavior Driven Development (BDD) FESCA 2010 User Story/ Scenario Customer Developer Business expert Arhitect Define](https://reader033.vdocuments.net/reader033/viewer/2022042620/5f43da644fa98e79a323cd05/html5/thumbnails/13.jpg)
shouldInclude(list[*], item[0..1]): Boolean
FESCA 2010
![Page 14: Behaviour-Driven Development of Foundational UML Components · Behavior Driven Development (BDD) FESCA 2010 User Story/ Scenario Customer Developer Business expert Arhitect Define](https://reader033.vdocuments.net/reader033/viewer/2022042620/5f43da644fa98e79a323cd05/html5/thumbnails/14.jpg)
bUML Tool
• Part of ComDeValco framework:
• extend action language
• Establish the steps of development:
– Project setting
– Requirements analysis
– Project planning
– Development iteration
– Verifiable progress
FESCA 2010
Project
fUMLmodels
UML fragment
fUMLVirtual
Machine
Requirementsanalysis
US1. Users add new stories to a projectUS2. Users add new scenarios to a story
Project Planning US3. Users add new iterations to a projectUS4. Users allocate stories to iterationsUS5. Developers accept stories
Development iteration
US6. Developers implement storiesUS7. Update iteration status after scenario executionUS8. Update project progress after scenario execution
Verifiable progress
US9. Users can obtain iteration status reportsUS10. Users can obtain project status reports
![Page 15: Behaviour-Driven Development of Foundational UML Components · Behavior Driven Development (BDD) FESCA 2010 User Story/ Scenario Customer Developer Business expert Arhitect Define](https://reader033.vdocuments.net/reader033/viewer/2022042620/5f43da644fa98e79a323cd05/html5/thumbnails/15.jpg)
Verifiable progress – remarks:
• After execution, models automatically update:
– Scenario status
– User story status.
• Different from platform dependent approaches
• Executed on models
FESCA 2010
![Page 16: Behaviour-Driven Development of Foundational UML Components · Behavior Driven Development (BDD) FESCA 2010 User Story/ Scenario Customer Developer Business expert Arhitect Define](https://reader033.vdocuments.net/reader033/viewer/2022042620/5f43da644fa98e79a323cd05/html5/thumbnails/16.jpg)
Related work
• no other existing works combine BDD and MDD approaches
• close to easyb http://www.easyb.org/ (2008)
• Business Motivation Model (BMM) and SysMLrequirements - consistency with the UML testing profile.
• Executable Acceptance Test-Driven Development (EATDD) [Park, Maurer] (2008)
FESCA 2010
![Page 17: Behaviour-Driven Development of Foundational UML Components · Behavior Driven Development (BDD) FESCA 2010 User Story/ Scenario Customer Developer Business expert Arhitect Define](https://reader033.vdocuments.net/reader033/viewer/2022042620/5f43da644fa98e79a323cd05/html5/thumbnails/17.jpg)
Thank you
FESCA 2010