BDD + UADD using Slim Presented by Ravichandran Jv.
-
Upload
anne-campbell -
Category
Documents
-
view
217 -
download
1
Transcript of BDD + UADD using Slim Presented by Ravichandran Jv.
![Page 1: BDD + UADD using Slim Presented by Ravichandran Jv.](https://reader035.fdocuments.us/reader035/viewer/2022071705/56649cfa5503460f949cc689/html5/thumbnails/1.jpg)
BDD + UADD using Slim
Presented byRavichandran Jv
![Page 2: BDD + UADD using Slim Presented by Ravichandran Jv.](https://reader035.fdocuments.us/reader035/viewer/2022071705/56649cfa5503460f949cc689/html5/thumbnails/2.jpg)
The Holy Grail
• As a <role> The Context
• I want... The Feature
• So that… The Business Value
![Page 3: BDD + UADD using Slim Presented by Ravichandran Jv.](https://reader035.fdocuments.us/reader035/viewer/2022071705/56649cfa5503460f949cc689/html5/thumbnails/3.jpg)
Given, When, Then
• Given a scenario Context
• When an input is made Event
• Then ensure some outcomeOutcome
![Page 4: BDD + UADD using Slim Presented by Ravichandran Jv.](https://reader035.fdocuments.us/reader035/viewer/2022071705/56649cfa5503460f949cc689/html5/thumbnails/4.jpg)
BDD
“B” for Behavior or Business?
• Although, popularly known as Behavior Driven Development, the context of business comes from the initiation of the requirements by the business in the form of Scenarios, which drives the development.
![Page 5: BDD + UADD using Slim Presented by Ravichandran Jv.](https://reader035.fdocuments.us/reader035/viewer/2022071705/56649cfa5503460f949cc689/html5/thumbnails/5.jpg)
“B” for Business
• As an ATM user,
• I want to withdraw cash from the ATM
• So that I don’t have to waste time finding a bank!
• At the outset this seems to be a simple requirement. But, in actuality, the story “unfolds”, so to speak, only when the different scenarios are unveiled!
![Page 6: BDD + UADD using Slim Presented by Ravichandran Jv.](https://reader035.fdocuments.us/reader035/viewer/2022071705/56649cfa5503460f949cc689/html5/thumbnails/6.jpg)
Scenarios - “B” for Behavior• Scenario 1: Valid card/user
Given the ATM card/user is validAnd the dispenser contains cashAnd the user account has funds
When the user withdraws cash
Then ensure the account is debitedAnd ensure cash is dispensedAnd ensure the card is returned
![Page 7: BDD + UADD using Slim Presented by Ravichandran Jv.](https://reader035.fdocuments.us/reader035/viewer/2022071705/56649cfa5503460f949cc689/html5/thumbnails/7.jpg)
Scenarios - “B” for Behavior• Scenario 2: Valid PIN
Given the ATM card is valid and PIN is validAnd the dispenser contains cashAnd the user account has funds
When the user withdraws cash
Then ensure the account is debitedAnd ensure cash is dispensedAnd ensure the card is returned
and etc.
![Page 8: BDD + UADD using Slim Presented by Ravichandran Jv.](https://reader035.fdocuments.us/reader035/viewer/2022071705/56649cfa5503460f949cc689/html5/thumbnails/8.jpg)
BDDThe fine line of difference between Behavior and Business
• Scenario or behavior is nothing but a set of business rules that help in defining the acceptance criteria.
• Satisfying business rules may lead one to understand it as Business Driven Development but for the sake of conforming to common usage, I will use Behavior Driven Development.
![Page 9: BDD + UADD using Slim Presented by Ravichandran Jv.](https://reader035.fdocuments.us/reader035/viewer/2022071705/56649cfa5503460f949cc689/html5/thumbnails/9.jpg)
UADD
• The User Acceptance Criteria (UAC) drives development here and helps identify progress.
• The UAC, therefore, helps in providing the right measure of progress.
• UACs also provide the additional advantage of always having clear requirements.
![Page 10: BDD + UADD using Slim Presented by Ravichandran Jv.](https://reader035.fdocuments.us/reader035/viewer/2022071705/56649cfa5503460f949cc689/html5/thumbnails/10.jpg)
In conclusion…
Requirements
• Business Rules + Scenarios = User Acceptance Criteria.
• BDD + UADD = Peace of mind!
![Page 11: BDD + UADD using Slim Presented by Ravichandran Jv.](https://reader035.fdocuments.us/reader035/viewer/2022071705/56649cfa5503460f949cc689/html5/thumbnails/11.jpg)
Tools
• JBehave• AgileDox• Rspec for Ruby
And, of course,• Slim
![Page 12: BDD + UADD using Slim Presented by Ravichandran Jv.](https://reader035.fdocuments.us/reader035/viewer/2022071705/56649cfa5503460f949cc689/html5/thumbnails/12.jpg)
A very brief introduction to Slim
![Page 13: BDD + UADD using Slim Presented by Ravichandran Jv.](https://reader035.fdocuments.us/reader035/viewer/2022071705/56649cfa5503460f949cc689/html5/thumbnails/13.jpg)
Slim
• What is Slim?• An acronym for Simple List Invocation
Method• Used like Fitnesse • Has its own Test System called {slim}
![Page 14: BDD + UADD using Slim Presented by Ravichandran Jv.](https://reader035.fdocuments.us/reader035/viewer/2022071705/56649cfa5503460f949cc689/html5/thumbnails/14.jpg)
Slim & Fitnesse
Slim Fitnesse
Decision Table Fit Column Fixture
Query Table Fit Row Fixture
Script Table Fit Do Fixture
![Page 15: BDD + UADD using Slim Presented by Ravichandran Jv.](https://reader035.fdocuments.us/reader035/viewer/2022071705/56649cfa5503460f949cc689/html5/thumbnails/15.jpg)
On to the workshop…
• Given • a series of strings of the pattern, “AT<2 letters>, A<2 letters>”
• When • there is an input, “AT<GC>, A<TA>”,
• Then • a pattern of string – 1st two letters (AT) + the 1st letter in the
1st angular brackets (G) + the 1st letter of the 2nd string (A) + the 1st letter in the 2nd angular bracket(T) should be generated and so on.
![Page 16: BDD + UADD using Slim Presented by Ravichandran Jv.](https://reader035.fdocuments.us/reader035/viewer/2022071705/56649cfa5503460f949cc689/html5/thumbnails/16.jpg)
Thank you!