SlideShare a Scribd company logo
BEHAVIOUR DRIVEN
DEVELOPMENT
ALEXANDRU BADIU
BEHAVIOUR DRIVEN DEVELOPMENT
ALEXANDRU BADIU
Drupal developer for 10 years.	

Drupal Romania founding member.	

I work at Demotix / Corbis.	


!
http://alexandrubadiu.ro	

http://twitter.com/voidberg

Drupalcamp Tirgu Mures 2013
BDD IS A SECOND-GENERATION,
OUTSIDE–IN, PULL-BASED,
MULTIPLE- STAKEHOLDER,
MULTIPLE-SCALE, 	

HIGH- AUTOMATION, 	

AGILE METHODOLOGY.
BEHAVIOUR DRIVEN DEVELOPMENT
WAIT, WHAT?
BEHAVIOUR DRIVEN DEVELOPMENT
TDD’S SHORTCOMINGS

• Unit tests, Inside - out.	

• Write the unit test before the code.	

• Typically written by the programmer.	

• Can’t test everything: full functional tests?	

• Can’t refactor as you wish: dependent on early tests.

Drupalcamp Tirgu Mures 2013
BEHAVIOUR DRIVEN DEVELOPMENT
BDD FEATURES

• It picks up where TDD leaves off.	

• Rethinking the approach to unit and acceptance testing.	

• Uses a common language that everyone can use from
all chains of command.	

• Becomes a test, a piece of documentation, a
specification.	

• Supported by a wide range of tools: Gherkin, Cucumber,
Behat, Travis, Jenkins, Jira and so on.
Drupalcamp Tirgu Mures 2013
BEHAVIOUR DRIVEN DEVELOPMENT
BDD FEATURES

• Test code or describe behaviour?	

• Both.	

• TDD is about ensuring behaviour.	

• BDD is about describing behaviour.

Drupalcamp Tirgu Mures 2013
BEHAVIOUR DRIVEN DEVELOPMENT
BDD FEATURES

• User story.	

• Stakeholder, effect, value.	

• Acceptance criteria or scenarios.	

• Steps.	

• Initial conditions.	

• Triggers.	

• Outcomes.
Drupalcamp Tirgu Mures 2013
BEHAVIOUR DRIVEN DEVELOPMENT
BDD FEATURES
Feature: Authentication!

!
In order to change my information and add sessions!
As a registered Drupalcamp user!
I need to be able to authenticate!
!
Scenario: User login!
Given I am on "/"!
When I follow "Log in"!
And I fill in "name" with "bddtest"!
And I fill in "pass" with "bddtest"!
And I press "Log in"!
Then I should see "My account" !

!
Scenario: User logout!
Given I am logged in!
And I am on "/"!
When I follow "Log out"!
Then I should see "Log in"

Drupalcamp Tirgu Mures 2013
BDD IS A SECONDGENERATION, OUTSIDE–IN,
PULL-BASED, MULTIPLESTAKEHOLDER, MULTIPLE-SCALE, 	

HIGH- AUTOMATION, 	

AGILE METHODOLOGY.
BEHAVIOUR DRIVEN DEVELOPMENT
BDD IN PHP

• Behat.	

• OSS.	

• Cucumber “language”.	

• Mink for testing web apps.	

• Different drivers: Selenium, zombie.js, goutte etc.

Drupalcamp Tirgu Mures 2013
BEHAVIOUR DRIVEN DEVELOPMENT
COMPOSER.JSON
{!
"require": {!
"behat/behat": "2.4.*@stable",!
"behat/mink": "1.5.*@stable",!
"behat/mink-extension": "*",!
"behat/mink-goutte-driver": "*",!
"behat/mink-selenium-driver": "*",!
"behat/mink-selenium2-driver": "*",!
"behat/mink-sahi-driver": "*",!
"behat/mink-zombie-driver": "*",!
},!
"minimum-stability": "dev",!
"config": {!
"bin-dir": "bin/"!
}!
}!

Drupalcamp Tirgu Mures 2013
BEHAVIOUR DRIVEN DEVELOPMENT
INSTALL
curl http://getcomposer.org/installer | php!
php composer.phar install —prefer-source!
!
bin/behat —init!
!
+d features - place your *.feature files here!
+d features/bootstrap - place bootstrap scripts and
static files here!
+f features/bootstrap/FeatureContext.php - place your
feature related code here

Drupalcamp Tirgu Mures 2013
BEHAVIOUR DRIVEN DEVELOPMENT
BEHAT.YML
default:!
extensions:!
BehatMinkExtensionExtension:!
base_url: http://drupalcamp.ro/!
goutte: ~!
zombie: ~!
sahi:!
port: 9999!
selenium2:!
wd_host: "http://127.0.0.1:4444/wd/hub"!
!
default_session: 'selenium2'!
javascript_session: 'selenium2'!

Drupalcamp Tirgu Mures 2013
DEMO
BEHAVIOUR DRIVEN DEVELOPMENT
BDD IN DRUPAL

• Behat Drupal Extension.	

• Provides step definitions for common testing scenarios
specific to Drupal sites.
Drupalcamp Tirgu Mures 2013
BEHAVIOUR DRIVEN DEVELOPMENT
BDD IN DRUPAL
composer.json!

!
!
!
!
!

"require": {!
! "drupal/drupal-extension": "*"!
!
},!

behat.yml!

!
!

DrupalDrupalExtensionExtension:!
blackbox: ~

Drupalcamp Tirgu Mures 2013
BEHAVIOUR DRIVEN DEVELOPMENT
BDD IN DRUPAL
Given I am logged in as a user with the "authenticated
user" role!
!
Then I should see the heading “History"!
!
Then I should see the heading "User login" in the "left
sidebar" region!
!
Given the cache has been cleared!
!
When I run cron!
!

Drupalcamp Tirgu Mures 2013
BEHAVIOUR DRIVEN DEVELOPMENT
BDD IN DRUPAL
Given "page" nodes:!
| title
|!
| Page one |!
| Page two |!
!
And "article" nodes:!
| title
|!
| First article |!
| Second article |!
!
Given "article" nodes:!
| title
| promote
| First article with fields |
1
!
Given users:!
| name
| mail
| status
| Joe User | joe@example.com | 1

| body
|!
| PLACEHOLDER BODY |!

|!
|

Drupalcamp Tirgu Mures 2013
THANK YOU
Alexandru Badiu

ALEXANDRUBADIU.RO
We’re hiring!	

AngularJS, Node.js.	

Come talk to me if you’re interested.

More Related Content

What's hot

The JAVA Training Workshop in Ahmedabad
The JAVA Training Workshop in AhmedabadThe JAVA Training Workshop in Ahmedabad
The JAVA Training Workshop in Ahmedabad
TOPS Technologies
 
Full-Stack Development
Full-Stack DevelopmentFull-Stack Development
Full-Stack Development
Dhilipsiva DS
 
PHP 2014/15 - Visión global del ecosistema PHP
PHP 2014/15 - Visión global del ecosistema PHPPHP 2014/15 - Visión global del ecosistema PHP
PHP 2014/15 - Visión global del ecosistema PHP
Carlos Buenosvinos
 
WordCamp Atlanta - April 15 2018 - dev team workflow and processes with word...
WordCamp Atlanta -  April 15 2018 - dev team workflow and processes with word...WordCamp Atlanta -  April 15 2018 - dev team workflow and processes with word...
WordCamp Atlanta - April 15 2018 - dev team workflow and processes with word...
Evan Mullins
 
Morden F2E Education - Think of Progressive Web Apps
Morden F2E Education - Think of Progressive Web AppsMorden F2E Education - Think of Progressive Web Apps
Morden F2E Education - Think of Progressive Web Apps
Caesar Chi
 
Java training in ahmedabad
Java training in ahmedabadJava training in ahmedabad
Java training in ahmedabad
TOPS Technologies
 
Getting Involved with Joomla - Why and how to contribute
Getting Involved with Joomla - Why and how to contributeGetting Involved with Joomla - Why and how to contribute
Getting Involved with Joomla - Why and how to contribute
Parth Lawate
 
Quo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynoteQuo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynote
Christian Heilmann
 
Prototyping UX Solutions with Playgrounds and Lightning Web Components
Prototyping UX Solutions with Playgrounds and Lightning Web ComponentsPrototyping UX Solutions with Playgrounds and Lightning Web Components
Prototyping UX Solutions with Playgrounds and Lightning Web Components
YeurDreamin'
 
Getting Started with DrupalGap
Getting Started with DrupalGapGetting Started with DrupalGap
Getting Started with DrupalGap
Alex S
 
When to (use / not use) React Native.
When to (use / not use) React Native.When to (use / not use) React Native.
When to (use / not use) React Native.
Bobby Schultz
 

What's hot (13)

Mobileweb
MobilewebMobileweb
Mobileweb
 
The JAVA Training Workshop in Ahmedabad
The JAVA Training Workshop in AhmedabadThe JAVA Training Workshop in Ahmedabad
The JAVA Training Workshop in Ahmedabad
 
Full-Stack Development
Full-Stack DevelopmentFull-Stack Development
Full-Stack Development
 
PHP 2014/15 - Visión global del ecosistema PHP
PHP 2014/15 - Visión global del ecosistema PHPPHP 2014/15 - Visión global del ecosistema PHP
PHP 2014/15 - Visión global del ecosistema PHP
 
WordCamp Atlanta - April 15 2018 - dev team workflow and processes with word...
WordCamp Atlanta -  April 15 2018 - dev team workflow and processes with word...WordCamp Atlanta -  April 15 2018 - dev team workflow and processes with word...
WordCamp Atlanta - April 15 2018 - dev team workflow and processes with word...
 
Morden F2E Education - Think of Progressive Web Apps
Morden F2E Education - Think of Progressive Web AppsMorden F2E Education - Think of Progressive Web Apps
Morden F2E Education - Think of Progressive Web Apps
 
Java training in ahmedabad
Java training in ahmedabadJava training in ahmedabad
Java training in ahmedabad
 
Getting Involved with Joomla - Why and how to contribute
Getting Involved with Joomla - Why and how to contributeGetting Involved with Joomla - Why and how to contribute
Getting Involved with Joomla - Why and how to contribute
 
Quo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynoteQuo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynote
 
Prototyping UX Solutions with Playgrounds and Lightning Web Components
Prototyping UX Solutions with Playgrounds and Lightning Web ComponentsPrototyping UX Solutions with Playgrounds and Lightning Web Components
Prototyping UX Solutions with Playgrounds and Lightning Web Components
 
Kickstart Jpa
Kickstart JpaKickstart Jpa
Kickstart Jpa
 
Getting Started with DrupalGap
Getting Started with DrupalGapGetting Started with DrupalGap
Getting Started with DrupalGap
 
When to (use / not use) React Native.
When to (use / not use) React Native.When to (use / not use) React Native.
When to (use / not use) React Native.
 

Viewers also liked

Behaviour Driven Development
Behaviour Driven DevelopmentBehaviour Driven Development
Behaviour Driven Development
Ben Goldin
 
Behaviour Driven Development
Behaviour Driven DevelopmentBehaviour Driven Development
Behaviour Driven Development
Richard Ruiter
 
Using Features
Using FeaturesUsing Features
Using Features
Alexandru Badiu
 
Behaviour-Driven Development
Behaviour-Driven DevelopmentBehaviour-Driven Development
Behaviour-Driven Development
Kerry Buckley
 
Principles and patterns for test driven development
Principles and patterns for test driven developmentPrinciples and patterns for test driven development
Principles and patterns for test driven development
Stephen Fuqua
 
Bahaviour Driven Development
Bahaviour Driven DevelopmentBahaviour Driven Development
Bahaviour Driven Development
buildmaster
 
Changing Your Mindset: Getting Started With Test-Driven Development
Changing Your Mindset: Getting Started With Test-Driven DevelopmentChanging Your Mindset: Getting Started With Test-Driven Development
Changing Your Mindset: Getting Started With Test-Driven Development
Viget Labs
 
Informed & Agile: Test Driven Design w/ Jon Innes
Informed & Agile: Test Driven Design w/ Jon InnesInformed & Agile: Test Driven Design w/ Jon Innes
Informed & Agile: Test Driven Design w/ Jon Innes
UserZoom
 
Introduction to Behaviour Driven Development
Introduction to Behaviour Driven DevelopmentIntroduction to Behaviour Driven Development
Introduction to Behaviour Driven Development
Christophe Achouiantz
 
BDD - Keep love alive
BDD - Keep love aliveBDD - Keep love alive
BDD - Keep love alive
Rory Preddy
 
Outside In - Behaviour Driven Development (BDD)
Outside In - Behaviour Driven Development (BDD)Outside In - Behaviour Driven Development (BDD)
Outside In - Behaviour Driven Development (BDD)
Naresh Jain
 
Scrum and Test-driven development
Scrum and Test-driven developmentScrum and Test-driven development
Scrum and Test-driven developmenttoteb5
 
Test-Driven Development (TDD)
Test-Driven Development (TDD)Test-Driven Development (TDD)
Test-Driven Development (TDD)
Brian Rasmussen
 
Test Driven Development (TDD)
Test Driven Development (TDD)Test Driven Development (TDD)
Test Driven Development (TDD)
David Ehringer
 
Behavior Driven Development (BDD) and Agile Testing
Behavior Driven Development (BDD) and Agile TestingBehavior Driven Development (BDD) and Agile Testing
Behavior Driven Development (BDD) and Agile Testingdversaci
 
Agile Test Driven Development
Agile Test Driven DevelopmentAgile Test Driven Development
Agile Test Driven Development
Viraf Karai
 

Viewers also liked (18)

Behaviour Driven Development
Behaviour Driven DevelopmentBehaviour Driven Development
Behaviour Driven Development
 
Behaviour Driven Development
Behaviour Driven DevelopmentBehaviour Driven Development
Behaviour Driven Development
 
Using Features
Using FeaturesUsing Features
Using Features
 
bdd behaviour driven development
bdd behaviour driven developmentbdd behaviour driven development
bdd behaviour driven development
 
Behaviour-Driven Development
Behaviour-Driven DevelopmentBehaviour-Driven Development
Behaviour-Driven Development
 
Principles and patterns for test driven development
Principles and patterns for test driven developmentPrinciples and patterns for test driven development
Principles and patterns for test driven development
 
TDD, BDD and mocks
TDD, BDD and mocksTDD, BDD and mocks
TDD, BDD and mocks
 
Bahaviour Driven Development
Bahaviour Driven DevelopmentBahaviour Driven Development
Bahaviour Driven Development
 
Changing Your Mindset: Getting Started With Test-Driven Development
Changing Your Mindset: Getting Started With Test-Driven DevelopmentChanging Your Mindset: Getting Started With Test-Driven Development
Changing Your Mindset: Getting Started With Test-Driven Development
 
Informed & Agile: Test Driven Design w/ Jon Innes
Informed & Agile: Test Driven Design w/ Jon InnesInformed & Agile: Test Driven Design w/ Jon Innes
Informed & Agile: Test Driven Design w/ Jon Innes
 
Introduction to Behaviour Driven Development
Introduction to Behaviour Driven DevelopmentIntroduction to Behaviour Driven Development
Introduction to Behaviour Driven Development
 
BDD - Keep love alive
BDD - Keep love aliveBDD - Keep love alive
BDD - Keep love alive
 
Outside In - Behaviour Driven Development (BDD)
Outside In - Behaviour Driven Development (BDD)Outside In - Behaviour Driven Development (BDD)
Outside In - Behaviour Driven Development (BDD)
 
Scrum and Test-driven development
Scrum and Test-driven developmentScrum and Test-driven development
Scrum and Test-driven development
 
Test-Driven Development (TDD)
Test-Driven Development (TDD)Test-Driven Development (TDD)
Test-Driven Development (TDD)
 
Test Driven Development (TDD)
Test Driven Development (TDD)Test Driven Development (TDD)
Test Driven Development (TDD)
 
Behavior Driven Development (BDD) and Agile Testing
Behavior Driven Development (BDD) and Agile TestingBehavior Driven Development (BDD) and Agile Testing
Behavior Driven Development (BDD) and Agile Testing
 
Agile Test Driven Development
Agile Test Driven DevelopmentAgile Test Driven Development
Agile Test Driven Development
 

Similar to Behavior Driven Development with Drupal

Improving WordPress Performance: Xdebug and PHP profiling
Improving WordPress Performance: Xdebug and PHP profilingImproving WordPress Performance: Xdebug and PHP profiling
Improving WordPress Performance: Xdebug and PHP profiling
Seravo
 
Auf Augenhöhe mit Android Studio und Gradle
Auf Augenhöhe mit Android Studio und GradleAuf Augenhöhe mit Android Studio und Gradle
Auf Augenhöhe mit Android Studio und Gradle
inovex GmbH
 
Android Studio und gradle
Android Studio und gradleAndroid Studio und gradle
Android Studio und gradle
Dominik Helleberg
 
Don't screw it up! How to build durable API
Don't screw it up! How to build durable API Don't screw it up! How to build durable API
Don't screw it up! How to build durable API
Alessandro Cinelli (cirpo)
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Michael Lihs
 
Quality code in wordpress
Quality code in wordpressQuality code in wordpress
Quality code in wordpress
Ran Bar-Zik
 
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)Hyun-woo Park
 
Moderne Android Builds mit Gradle
Moderne Android Builds mit GradleModerne Android Builds mit Gradle
Moderne Android Builds mit Gradle
inovex GmbH
 
UMD User's Group: DrupalCon 2011, Chicago
UMD User's Group: DrupalCon 2011, ChicagoUMD User's Group: DrupalCon 2011, Chicago
UMD User's Group: DrupalCon 2011, Chicago
brockfanning
 
PlovDev 2016: Drupal 8 Evolution & Kickstart by Ivo Radulovski
PlovDev 2016: Drupal 8 Evolution & Kickstart by Ivo RadulovskiPlovDev 2016: Drupal 8 Evolution & Kickstart by Ivo Radulovski
PlovDev 2016: Drupal 8 Evolution & Kickstart by Ivo Radulovski
PlovDev Conference
 
Bridging the gap between business and technology - Behaviour Driven Developme...
Bridging the gap between business and technology - Behaviour Driven Developme...Bridging the gap between business and technology - Behaviour Driven Developme...
Bridging the gap between business and technology - Behaviour Driven Developme...
Eugenio Minardi
 
PHP Mega Meetup, Sep, 2020, Anti patterns in php
PHP Mega Meetup, Sep, 2020, Anti patterns in phpPHP Mega Meetup, Sep, 2020, Anti patterns in php
PHP Mega Meetup, Sep, 2020, Anti patterns in php
Ahmed Abdou
 
Mobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to NativeMobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to Native
MartinSotirov
 
Building a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared ToBuilding a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared To
Raymond Camden
 
Introduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App DevelopmentIntroduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App Development
Özcan Zafer AYAN
 
BUILDING WEB APPS WITH ASP.NET MVC AND NOSQL
BUILDING WEB APPS WITH ASP.NET MVC AND NOSQLBUILDING WEB APPS WITH ASP.NET MVC AND NOSQL
BUILDING WEB APPS WITH ASP.NET MVC AND NOSQL
Michael Kennedy
 
Drupal Continuous Integration (European Drupal Days 2015)
Drupal Continuous Integration (European Drupal Days 2015)Drupal Continuous Integration (European Drupal Days 2015)
Drupal Continuous Integration (European Drupal Days 2015)
Eugenio Minardi
 
Samsung Devcon - State of HTML5 - Chris Heilmann
Samsung Devcon - State of HTML5 - Chris HeilmannSamsung Devcon - State of HTML5 - Chris Heilmann
Samsung Devcon - State of HTML5 - Chris Heilmann
Christian Heilmann
 
Debugging with Zend Studio for Eclipse
Debugging with Zend Studio for EclipseDebugging with Zend Studio for Eclipse
Debugging with Zend Studio for Eclipse
OSSCube
 
phonegap with angular js for freshers
phonegap with angular js for freshers    phonegap with angular js for freshers
phonegap with angular js for freshers
dssprakash
 

Similar to Behavior Driven Development with Drupal (20)

Improving WordPress Performance: Xdebug and PHP profiling
Improving WordPress Performance: Xdebug and PHP profilingImproving WordPress Performance: Xdebug and PHP profiling
Improving WordPress Performance: Xdebug and PHP profiling
 
Auf Augenhöhe mit Android Studio und Gradle
Auf Augenhöhe mit Android Studio und GradleAuf Augenhöhe mit Android Studio und Gradle
Auf Augenhöhe mit Android Studio und Gradle
 
Android Studio und gradle
Android Studio und gradleAndroid Studio und gradle
Android Studio und gradle
 
Don't screw it up! How to build durable API
Don't screw it up! How to build durable API Don't screw it up! How to build durable API
Don't screw it up! How to build durable API
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
 
Quality code in wordpress
Quality code in wordpressQuality code in wordpress
Quality code in wordpress
 
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
 
Moderne Android Builds mit Gradle
Moderne Android Builds mit GradleModerne Android Builds mit Gradle
Moderne Android Builds mit Gradle
 
UMD User's Group: DrupalCon 2011, Chicago
UMD User's Group: DrupalCon 2011, ChicagoUMD User's Group: DrupalCon 2011, Chicago
UMD User's Group: DrupalCon 2011, Chicago
 
PlovDev 2016: Drupal 8 Evolution & Kickstart by Ivo Radulovski
PlovDev 2016: Drupal 8 Evolution & Kickstart by Ivo RadulovskiPlovDev 2016: Drupal 8 Evolution & Kickstart by Ivo Radulovski
PlovDev 2016: Drupal 8 Evolution & Kickstart by Ivo Radulovski
 
Bridging the gap between business and technology - Behaviour Driven Developme...
Bridging the gap between business and technology - Behaviour Driven Developme...Bridging the gap between business and technology - Behaviour Driven Developme...
Bridging the gap between business and technology - Behaviour Driven Developme...
 
PHP Mega Meetup, Sep, 2020, Anti patterns in php
PHP Mega Meetup, Sep, 2020, Anti patterns in phpPHP Mega Meetup, Sep, 2020, Anti patterns in php
PHP Mega Meetup, Sep, 2020, Anti patterns in php
 
Mobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to NativeMobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to Native
 
Building a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared ToBuilding a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared To
 
Introduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App DevelopmentIntroduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App Development
 
BUILDING WEB APPS WITH ASP.NET MVC AND NOSQL
BUILDING WEB APPS WITH ASP.NET MVC AND NOSQLBUILDING WEB APPS WITH ASP.NET MVC AND NOSQL
BUILDING WEB APPS WITH ASP.NET MVC AND NOSQL
 
Drupal Continuous Integration (European Drupal Days 2015)
Drupal Continuous Integration (European Drupal Days 2015)Drupal Continuous Integration (European Drupal Days 2015)
Drupal Continuous Integration (European Drupal Days 2015)
 
Samsung Devcon - State of HTML5 - Chris Heilmann
Samsung Devcon - State of HTML5 - Chris HeilmannSamsung Devcon - State of HTML5 - Chris Heilmann
Samsung Devcon - State of HTML5 - Chris Heilmann
 
Debugging with Zend Studio for Eclipse
Debugging with Zend Studio for EclipseDebugging with Zend Studio for Eclipse
Debugging with Zend Studio for Eclipse
 
phonegap with angular js for freshers
phonegap with angular js for freshers    phonegap with angular js for freshers
phonegap with angular js for freshers
 

More from Alexandru Badiu

Drupal 8
Drupal 8Drupal 8
Drupal 8
Alexandru Badiu
 
Drupal as a first class mobile platform
Drupal as a first class mobile platformDrupal as a first class mobile platform
Drupal as a first class mobile platform
Alexandru Badiu
 
Cloud to the rescue? How I learned to stop worrying and love the cloud
Cloud to the rescue? How I learned to stop worrying and love the cloudCloud to the rescue? How I learned to stop worrying and love the cloud
Cloud to the rescue? How I learned to stop worrying and love the cloud
Alexandru Badiu
 
REST Drupal
REST DrupalREST Drupal
REST Drupal
Alexandru Badiu
 
Cloud to the rescue? How I learned to stop worrying and love the cloud
Cloud to the rescue? How I learned to stop worrying and love the cloudCloud to the rescue? How I learned to stop worrying and love the cloud
Cloud to the rescue? How I learned to stop worrying and love the cloud
Alexandru Badiu
 
Learning the basics of the Drupal API
Learning the basics of the Drupal APILearning the basics of the Drupal API
Learning the basics of the Drupal API
Alexandru Badiu
 
What's new in the Drupal 7 API?
What's new in the Drupal 7 API?What's new in the Drupal 7 API?
What's new in the Drupal 7 API?
Alexandru Badiu
 
Drupal, Android and iPhone
Drupal, Android and iPhoneDrupal, Android and iPhone
Drupal, Android and iPhone
Alexandru Badiu
 
Publish and Subscribe
Publish and SubscribePublish and Subscribe
Publish and Subscribe
Alexandru Badiu
 
Using Features
Using FeaturesUsing Features
Using Features
Alexandru Badiu
 
Concepte de programare functionala in Javascript
Concepte de programare functionala in JavascriptConcepte de programare functionala in Javascript
Concepte de programare functionala in Javascript
Alexandru Badiu
 
Drupal and Solr
Drupal and SolrDrupal and Solr
Drupal and Solr
Alexandru Badiu
 
Prezentare Wurbe
Prezentare WurbePrezentare Wurbe
Prezentare Wurbe
Alexandru Badiu
 

More from Alexandru Badiu (13)

Drupal 8
Drupal 8Drupal 8
Drupal 8
 
Drupal as a first class mobile platform
Drupal as a first class mobile platformDrupal as a first class mobile platform
Drupal as a first class mobile platform
 
Cloud to the rescue? How I learned to stop worrying and love the cloud
Cloud to the rescue? How I learned to stop worrying and love the cloudCloud to the rescue? How I learned to stop worrying and love the cloud
Cloud to the rescue? How I learned to stop worrying and love the cloud
 
REST Drupal
REST DrupalREST Drupal
REST Drupal
 
Cloud to the rescue? How I learned to stop worrying and love the cloud
Cloud to the rescue? How I learned to stop worrying and love the cloudCloud to the rescue? How I learned to stop worrying and love the cloud
Cloud to the rescue? How I learned to stop worrying and love the cloud
 
Learning the basics of the Drupal API
Learning the basics of the Drupal APILearning the basics of the Drupal API
Learning the basics of the Drupal API
 
What's new in the Drupal 7 API?
What's new in the Drupal 7 API?What's new in the Drupal 7 API?
What's new in the Drupal 7 API?
 
Drupal, Android and iPhone
Drupal, Android and iPhoneDrupal, Android and iPhone
Drupal, Android and iPhone
 
Publish and Subscribe
Publish and SubscribePublish and Subscribe
Publish and Subscribe
 
Using Features
Using FeaturesUsing Features
Using Features
 
Concepte de programare functionala in Javascript
Concepte de programare functionala in JavascriptConcepte de programare functionala in Javascript
Concepte de programare functionala in Javascript
 
Drupal and Solr
Drupal and SolrDrupal and Solr
Drupal and Solr
 
Prezentare Wurbe
Prezentare WurbePrezentare Wurbe
Prezentare Wurbe
 

Recently uploaded

Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 

Recently uploaded (20)

Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 

Behavior Driven Development with Drupal

  • 2. BEHAVIOUR DRIVEN DEVELOPMENT ALEXANDRU BADIU Drupal developer for 10 years. Drupal Romania founding member. I work at Demotix / Corbis. ! http://alexandrubadiu.ro http://twitter.com/voidberg Drupalcamp Tirgu Mures 2013
  • 3. BDD IS A SECOND-GENERATION, OUTSIDE–IN, PULL-BASED, MULTIPLE- STAKEHOLDER, MULTIPLE-SCALE, HIGH- AUTOMATION, AGILE METHODOLOGY.
  • 5. BEHAVIOUR DRIVEN DEVELOPMENT TDD’S SHORTCOMINGS • Unit tests, Inside - out. • Write the unit test before the code. • Typically written by the programmer. • Can’t test everything: full functional tests? • Can’t refactor as you wish: dependent on early tests. Drupalcamp Tirgu Mures 2013
  • 6. BEHAVIOUR DRIVEN DEVELOPMENT BDD FEATURES • It picks up where TDD leaves off. • Rethinking the approach to unit and acceptance testing. • Uses a common language that everyone can use from all chains of command. • Becomes a test, a piece of documentation, a specification. • Supported by a wide range of tools: Gherkin, Cucumber, Behat, Travis, Jenkins, Jira and so on. Drupalcamp Tirgu Mures 2013
  • 7. BEHAVIOUR DRIVEN DEVELOPMENT BDD FEATURES • Test code or describe behaviour? • Both. • TDD is about ensuring behaviour. • BDD is about describing behaviour. Drupalcamp Tirgu Mures 2013
  • 8. BEHAVIOUR DRIVEN DEVELOPMENT BDD FEATURES • User story. • Stakeholder, effect, value. • Acceptance criteria or scenarios. • Steps. • Initial conditions. • Triggers. • Outcomes. Drupalcamp Tirgu Mures 2013
  • 9. BEHAVIOUR DRIVEN DEVELOPMENT BDD FEATURES Feature: Authentication! ! In order to change my information and add sessions! As a registered Drupalcamp user! I need to be able to authenticate! ! Scenario: User login! Given I am on "/"! When I follow "Log in"! And I fill in "name" with "bddtest"! And I fill in "pass" with "bddtest"! And I press "Log in"! Then I should see "My account" ! ! Scenario: User logout! Given I am logged in! And I am on "/"! When I follow "Log out"! Then I should see "Log in" Drupalcamp Tirgu Mures 2013
  • 10. BDD IS A SECONDGENERATION, OUTSIDE–IN, PULL-BASED, MULTIPLESTAKEHOLDER, MULTIPLE-SCALE, HIGH- AUTOMATION, AGILE METHODOLOGY.
  • 11. BEHAVIOUR DRIVEN DEVELOPMENT BDD IN PHP • Behat. • OSS. • Cucumber “language”. • Mink for testing web apps. • Different drivers: Selenium, zombie.js, goutte etc. Drupalcamp Tirgu Mures 2013
  • 12. BEHAVIOUR DRIVEN DEVELOPMENT COMPOSER.JSON {! "require": {! "behat/behat": "2.4.*@stable",! "behat/mink": "1.5.*@stable",! "behat/mink-extension": "*",! "behat/mink-goutte-driver": "*",! "behat/mink-selenium-driver": "*",! "behat/mink-selenium2-driver": "*",! "behat/mink-sahi-driver": "*",! "behat/mink-zombie-driver": "*",! },! "minimum-stability": "dev",! "config": {! "bin-dir": "bin/"! }! }! Drupalcamp Tirgu Mures 2013
  • 13. BEHAVIOUR DRIVEN DEVELOPMENT INSTALL curl http://getcomposer.org/installer | php! php composer.phar install —prefer-source! ! bin/behat —init! ! +d features - place your *.feature files here! +d features/bootstrap - place bootstrap scripts and static files here! +f features/bootstrap/FeatureContext.php - place your feature related code here Drupalcamp Tirgu Mures 2013
  • 14. BEHAVIOUR DRIVEN DEVELOPMENT BEHAT.YML default:! extensions:! BehatMinkExtensionExtension:! base_url: http://drupalcamp.ro/! goutte: ~! zombie: ~! sahi:! port: 9999! selenium2:! wd_host: "http://127.0.0.1:4444/wd/hub"! ! default_session: 'selenium2'! javascript_session: 'selenium2'! Drupalcamp Tirgu Mures 2013
  • 15. DEMO
  • 16. BEHAVIOUR DRIVEN DEVELOPMENT BDD IN DRUPAL • Behat Drupal Extension. • Provides step definitions for common testing scenarios specific to Drupal sites. Drupalcamp Tirgu Mures 2013
  • 17. BEHAVIOUR DRIVEN DEVELOPMENT BDD IN DRUPAL composer.json! ! ! ! ! ! "require": {! ! "drupal/drupal-extension": "*"! ! },! behat.yml! ! ! DrupalDrupalExtensionExtension:! blackbox: ~ Drupalcamp Tirgu Mures 2013
  • 18. BEHAVIOUR DRIVEN DEVELOPMENT BDD IN DRUPAL Given I am logged in as a user with the "authenticated user" role! ! Then I should see the heading “History"! ! Then I should see the heading "User login" in the "left sidebar" region! ! Given the cache has been cleared! ! When I run cron! ! Drupalcamp Tirgu Mures 2013
  • 19. BEHAVIOUR DRIVEN DEVELOPMENT BDD IN DRUPAL Given "page" nodes:! | title |! | Page one |! | Page two |! ! And "article" nodes:! | title |! | First article |! | Second article |! ! Given "article" nodes:! | title | promote | First article with fields | 1 ! Given users:! | name | mail | status | Joe User | joe@example.com | 1 | body |! | PLACEHOLDER BODY |! |! | Drupalcamp Tirgu Mures 2013
  • 21. We’re hiring! AngularJS, Node.js. Come talk to me if you’re interested.