SlideShare ist ein Scribd-Unternehmen logo
1 von 41
Downloaden Sie, um offline zu lesen
How I Wrote My Own
BDD Framework
Earlier last year...
Revamped our Automated UAT Suite
5 Months to Develop
200 Files
7,000 LOC
Pretty Reports
“Smelly Test Code”
(eww)
“Because It’s There.”
Photo by @topgold http://www.flickr.com/photos/44124366475@N01/4509103
Demo
https://github.com/ManaManaFramework/demos
Some Stats
500+ lines of human-editable code
94.8% Ruby
5.2% Ragel
90% Code Coverage
Ruby 1.9.3 and 2.0.0
i18n support out of the box
How It Works
How It Works
RDSL
Lexer
RDSL
Parser
TDSL TDSL
Lexer
TDSL
Parser
Spec
File Runner
Step
Defs
Output
RDSL
Compiler
Lexing (aka Tokenizing) Analogy
Dajalk j lkafjda V ljad jala l kajd ad eWwera 12
etq qowrer dSad we Dwlakd aDalkja akerkrjd
Create a Project A user with a role of <Role> in the
system <Can or Cannot Create> projects
Lexing (aka Tokenizing)
Create a Project
================
* A user with a role of <Role> in the system
<Can or Cannot Create> projects
Examples:
| Role | Can or Cannot Create |
| Admin | Can Create |
| User | Cannot Create |
[
[:GROUP, 'Create a Project'],
[:REQUIREMENT, 'Given a user has a role of ...'],
[:TEXT, 'Examples:'],
[:ROW, nil], [:CELL, 'Role' ], [:CELL, 'Can or Cannot Create'],
[:ROW, nil], [:CELL, 'Admin'], [:CELL, 'Can Create'],
[:ROW, nil], [:CELL, 'User' ], [:CELL, 'Cannot Create']
]
Don’t Write Your Lexer in Ruby
How it Works
Ragel
Lexer
Definition
RDSL
Lexer
Create a Project
================
* A user with a role of <Role> in the system
<Can or Cannot Create> projects
Examples:
| Role | Can or Cannot Create |
| Admin | Can Create |
| User | Cannot Create |
[
[:GROUP, 'Create a Project'],
[:REQUIREMENT, 'Given a user has a role of ...'],
[:TEXT, 'Examples:'],
[:ROW, nil], [:CELL, 'Role' ], [:CELL, 'Can or Cannot Create'],
[:ROW, nil], [:CELL, 'Admin'], [:CELL, 'Can Create'],
[:ROW, nil], [:CELL, 'User' ], [:CELL, 'Cannot Create']
]
[:GROUP, 'Create a Project']
Create a Project
================
RDSL
Lexer
RDSL
Parser
TDSL TDSL
Lexer
TDSL
Parser
Spec
File Runner
Step
Defs
Output
RDSL
Compiler
Lexing (aka Tokenizing) Analogy
Dajalk j lkafjda V ljad jala l kajd ad eWwera 12
etq qowrer dSad we Dwlakd aDalkja akerkrjd
Create a Project A user with a role of <Role> in the
system <Can or Cannot Create> projects
Parsing Analogy
Create a Project A user with a role of <Role> in the
system <Can or Cannot Create> projects
Create a Project
A user with a role of <Role> in the system
<Can or Cannot Create> projects
Parsing
GroupNode.new('Create a Project', [
RequirementNode.new('Given a user has a role of ...', [
ExamplesNode.new([
RowNode.new(['Role', 'Can or Cannot Create']),
RowNode.new(['Admin', 'Can Create']),
RowNode.new(['User', 'Cannot Create'])
])
])
])
[
[:GROUP, 'Create a Project'],
[:REQUIREMENT, 'Given a user has a role of ...'],
[:ROW, nil], [:CELL, 'Role' ], [:CELL, 'Can or Cannot Create'],
[:ROW, nil], [:CELL, 'Admin'], [:CELL, 'Can Create'],
[:ROW, nil], [:CELL, 'User' ], [:CELL, 'Cannot Create']
]
How it Works
Racc
Parser
Definition
RDSL
Parser
Racc
Runtime
GroupNode.new('Create a Project', [
RequirementNode.new('Given a user has a role of ...', [
ExamplesNode.new([
RowNode.new(['Role', 'Can or Cannot Create']),
RowNode.new(['Admin', 'Can Create']),
RowNode.new(['User', 'Cannot Create'])
])
])
])
[
[:GROUP, 'Create a Project'],
[:REQUIREMENT, 'Given a user has a role of ...'],
[:ROW, nil], [:CELL, 'Role' ], [:CELL, 'Can or Cannot Create'],
[:ROW, nil], [:CELL, 'Admin'], [:CELL, 'Can Create'],
[:ROW, nil], [:CELL, 'User' ], [:CELL, 'Cannot Create']
]
RDSL
Lexer
RDSL
Parser
TDSL TDSL
Lexer
TDSL
Parser
Spec
File Runner
Step
Defs
Output
RDSL
Compiler
Wish List
Hierarchical Requirements
Call Test from Test
Wait for Human Evaluation
Do
Something
Display
Output to
Human
Wait for
Human
Evaluation
OK?
Mark Test
Passed
Mark Test
Failed
Oh, BTW...we’re hiring!
Ruby Devs
JavaScript/CSS/HTML5 Devs
Project Managers
email me at mark@morphlabs.com

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

ELAG Workshop version 1
ELAG Workshop version 1ELAG Workshop version 1
ELAG Workshop version 1
 
Scala.js for large and complex frontend apps
Scala.js for large and complex frontend appsScala.js for large and complex frontend apps
Scala.js for large and complex frontend apps
 
Crafting Evolvable Api Responses
Crafting Evolvable Api ResponsesCrafting Evolvable Api Responses
Crafting Evolvable Api Responses
 
Introduction to ELK
Introduction to ELKIntroduction to ELK
Introduction to ELK
 
Introduction to ELK
Introduction to ELKIntroduction to ELK
Introduction to ELK
 
Data migration into eav model
Data migration into eav modelData migration into eav model
Data migration into eav model
 
Coolblue - Behind the Scenes Continuous Integration & Deployment
Coolblue - Behind the Scenes Continuous Integration & DeploymentCoolblue - Behind the Scenes Continuous Integration & Deployment
Coolblue - Behind the Scenes Continuous Integration & Deployment
 
ELK Stack
ELK StackELK Stack
ELK Stack
 
Scala in a wild enterprise
Scala in a wild enterpriseScala in a wild enterprise
Scala in a wild enterprise
 
ELK: a log management framework
ELK: a log management frameworkELK: a log management framework
ELK: a log management framework
 
Elk
Elk Elk
Elk
 
Introduction to Akka - Atlanta Java Users Group
Introduction to Akka - Atlanta Java Users GroupIntroduction to Akka - Atlanta Java Users Group
Introduction to Akka - Atlanta Java Users Group
 
Actor Model Akka Framework
Actor Model Akka FrameworkActor Model Akka Framework
Actor Model Akka Framework
 
Distributed Eventing in OSGi
Distributed Eventing in OSGiDistributed Eventing in OSGi
Distributed Eventing in OSGi
 
Realm of the Mobile Database: an introduction to Realm
Realm of the Mobile Database: an introduction to RealmRealm of the Mobile Database: an introduction to Realm
Realm of the Mobile Database: an introduction to Realm
 
elk_stack_alexander_szalonnas
elk_stack_alexander_szalonnaselk_stack_alexander_szalonnas
elk_stack_alexander_szalonnas
 
Logging in Scala
Logging in ScalaLogging in Scala
Logging in Scala
 
Logging logs with Logstash - Devops MK 10-02-2016
Logging logs with Logstash - Devops MK 10-02-2016Logging logs with Logstash - Devops MK 10-02-2016
Logging logs with Logstash - Devops MK 10-02-2016
 
Lightbend Lagom: Microservices Just Right (Scala Days 2016 Berlin)
Lightbend Lagom: Microservices Just Right (Scala Days 2016 Berlin)Lightbend Lagom: Microservices Just Right (Scala Days 2016 Berlin)
Lightbend Lagom: Microservices Just Right (Scala Days 2016 Berlin)
 
Introduction to Scala JS
Introduction to Scala JSIntroduction to Scala JS
Introduction to Scala JS
 

Andere mochten auch

Andere mochten auch (17)

досвід жосан
досвід жосандосвід жосан
досвід жосан
 
план
планплан
план
 
план
планплан
план
 
тести 1
тести 1тести 1
тести 1
 
огляд 4 кл
огляд 4 клогляд 4 кл
огляд 4 кл
 
STACK
STACKSTACK
STACK
 
Recommender Systems, Part 1 - Introduction to approaches and algorithms
Recommender Systems, Part 1 - Introduction to approaches and algorithmsRecommender Systems, Part 1 - Introduction to approaches and algorithms
Recommender Systems, Part 1 - Introduction to approaches and algorithms
 
презент.вчителя
презент.вчителяпрезент.вчителя
презент.вчителя
 
Starting From Zero - Winning Strategies for Zero Results Page
Starting From Zero - Winning Strategies for Zero Results PageStarting From Zero - Winning Strategies for Zero Results Page
Starting From Zero - Winning Strategies for Zero Results Page
 
MemSQL
MemSQLMemSQL
MemSQL
 
презентація1 учня
презентація1 учняпрезентація1 учня
презентація1 учня
 
Apache Solr 4 Part 1 - Introduction, Features, Recency Ranking and Popularity...
Apache Solr 4 Part 1 - Introduction, Features, Recency Ranking and Popularity...Apache Solr 4 Part 1 - Introduction, Features, Recency Ranking and Popularity...
Apache Solr 4 Part 1 - Introduction, Features, Recency Ranking and Popularity...
 
Presentation With Mp3
Presentation With Mp3Presentation With Mp3
Presentation With Mp3
 
Dell Lustre Storage Architecture Presentation - MBUG 2016
Dell Lustre Storage Architecture Presentation - MBUG 2016Dell Lustre Storage Architecture Presentation - MBUG 2016
Dell Lustre Storage Architecture Presentation - MBUG 2016
 
Search Behavior Patterns
Search Behavior PatternsSearch Behavior Patterns
Search Behavior Patterns
 
Cavaliere Sabbioni
Cavaliere SabbioniCavaliere Sabbioni
Cavaliere Sabbioni
 
414d2891bf501b0528e25dacb07da708
414d2891bf501b0528e25dacb07da708414d2891bf501b0528e25dacb07da708
414d2891bf501b0528e25dacb07da708
 

Ähnlich wie How i wrote my own bdd framework

SQLCLR For DBAs and Developers
SQLCLR For DBAs and DevelopersSQLCLR For DBAs and Developers
SQLCLR For DBAs and Developers
webhostingguy
 
Dr. Jekyll and Mr. Hyde
Dr. Jekyll and Mr. HydeDr. Jekyll and Mr. Hyde
Dr. Jekyll and Mr. Hyde
webhostingguy
 
Fast Web Applications Development with Ruby on Rails on Oracle
Fast Web Applications Development with Ruby on Rails on OracleFast Web Applications Development with Ruby on Rails on Oracle
Fast Web Applications Development with Ruby on Rails on Oracle
Raimonds Simanovskis
 
Qtp connect to an oracle database database - database skill
Qtp connect to an oracle database   database - database skillQtp connect to an oracle database   database - database skill
Qtp connect to an oracle database database - database skill
siva1991
 
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
Mark Rackley
 

Ähnlich wie How i wrote my own bdd framework (20)

Green dao
Green daoGreen dao
Green dao
 
4 jdbc step1
4 jdbc step14 jdbc step1
4 jdbc step1
 
New and improved hacking oracle from web apps sumit sidharth
New and improved hacking oracle from web apps   sumit sidharthNew and improved hacking oracle from web apps   sumit sidharth
New and improved hacking oracle from web apps sumit sidharth
 
SQL Server R Services: What Every SQL Professional Should Know
SQL Server R Services: What Every SQL Professional Should KnowSQL Server R Services: What Every SQL Professional Should Know
SQL Server R Services: What Every SQL Professional Should Know
 
Generating Code with Oracle SQL Developer Data Modeler
Generating Code with Oracle SQL Developer Data ModelerGenerating Code with Oracle SQL Developer Data Modeler
Generating Code with Oracle SQL Developer Data Modeler
 
Play framework
Play frameworkPlay framework
Play framework
 
Javascript first-class citizenery
Javascript first-class citizeneryJavascript first-class citizenery
Javascript first-class citizenery
 
SQLCLR For DBAs and Developers
SQLCLR For DBAs and DevelopersSQLCLR For DBAs and Developers
SQLCLR For DBAs and Developers
 
Dr. Jekyll and Mr. Hyde
Dr. Jekyll and Mr. HydeDr. Jekyll and Mr. Hyde
Dr. Jekyll and Mr. Hyde
 
Gnizr Architecture (for developers)
Gnizr Architecture (for developers)Gnizr Architecture (for developers)
Gnizr Architecture (for developers)
 
Sufan presentation
Sufan presentationSufan presentation
Sufan presentation
 
Rajnish singh(presentation on oracle )
Rajnish singh(presentation on  oracle )Rajnish singh(presentation on  oracle )
Rajnish singh(presentation on oracle )
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
 
Road to Rails
Road to RailsRoad to Rails
Road to Rails
 
Fast Web Applications Development with Ruby on Rails on Oracle
Fast Web Applications Development with Ruby on Rails on OracleFast Web Applications Development with Ruby on Rails on Oracle
Fast Web Applications Development with Ruby on Rails on Oracle
 
Qtp connect to an oracle database database - database skill
Qtp connect to an oracle database   database - database skillQtp connect to an oracle database   database - database skill
Qtp connect to an oracle database database - database skill
 
Testing database content with DBUnit. My experience.
Testing database content with DBUnit. My experience.Testing database content with DBUnit. My experience.
Testing database content with DBUnit. My experience.
 
One Click Provisioning With Enterprise Manager 12c
One Click Provisioning With Enterprise Manager 12cOne Click Provisioning With Enterprise Manager 12c
One Click Provisioning With Enterprise Manager 12c
 
Release 8.1 - Breakfast Paris
Release 8.1 - Breakfast ParisRelease 8.1 - Breakfast Paris
Release 8.1 - Breakfast Paris
 
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

How i wrote my own bdd framework