SlideShare a Scribd company logo
Ivan Lozić, CEO of Deegloo
BDD with Cucumber
ivan@deegloo.com
Who am I?
- CEO of Deegloo - software agency
- Software Engineer with ~10 years of
professional experience
- .Net, iOS developer, Java
- Software Architect
- Car Industry, Dairy Industry
- Software Development Agency
- Developing US Dairy Industry products
- Web, Mobile and Data Science
Source: Dairy.com
What Does Deegloo Do?
Behavior Driven Development
“Agile Software Development Process which encourages collaboration between
developers, QA and non-technical people”
Source: Wikipedia
User Story
As a (type of user), I would like to be able to (do some action), so that I can (achieve
some goal or get some result)
Acceptance Criteria
Scenario: Given … When I ... Then...
Collaboration
BDD specs are written in simple, descriptive text and are understandable by
non-technical people
PO/PM, Sales, ...
Specification by Example
Collaborative approach of...
Capturing and illustrating requirements through realistic examples instead of
abstract statements
So, why does this matter? - Human brains are generally not that great at
understanding abstractions
How does BDD relate to TDD?
Emerged from TDD
Both are test first approach
BDD focuses on behavior, and not on implementation
i.e. BDD tests product from users perspective, instead of testing the code
i.e. BDD doesn’t care about how a particular output is created, only that it is correct
under specified conditions
Cucumber
A tool which supports BDD
Enables writing specifications
Integrates with IntelliJ, Eclipse, Jira, ...
Gherkin
- Domain specific language
- Helps describing business behaviour without going into technical details
- Acts like a living documentation
Basic Gherkin Syntax
● Feature
● Scenario
● Given
● When
● Then
IDE Integration and Test Setup
Example with IntelliJ
Cucumber + Gherkin
An Example
Cucumber + Gherkin
It still requires coding :)
Cucumber + Gherkin
It still requires coding :)
Cucumber + Gherkin
Running the Spec
Cucumber + Gherkin
Running the Spec
Real World Example
- FC Tracker is a tool used by brokers allowing for Milk Commodity trading at
the Market Exchange
- ~1 year of development
- We combined JUnit Integration tests and Cucumber specs
- 394 Integration tests
- 128 Cucumber scenarios in 49 features
- All tests running against in-memory H2 database
Forward Contracting Tool
Real World Example
Forward Contracting Tool
Controller
Service
Repository
db
Specification
Real World Example
Forward Contracting Tool
Real World Example
Learnings
- Overall a positive experience
- It takes initial learning time before becoming productive
- Integrating all layers makes sense
- Steps are reusable across features, need to be careful about naming them
- Choosing correct wording matters to make specs readable
BDD and Cucumber Sound
Good?
Still, not many of us do it in the industry...
The Typical Excuse
We don’t have enough time to write tests
Understood, however...
Let’s consider the following scenarios
Scenario 1
Cognitive Limitation
Human beings are cognitively limited
We can process only so much at the particular moment
Do we want to focus on identifying behaviors through examples OR
do we want to jump into implementation immediately?
Scenario 2
Collaborating with PO
My experience: working together with PO on defining all acceptance tests for
free-text search functionality
Scenario 3
Fear of Refactoring
Programming is hard… Understanding other people’s (bad) code is even harder...
Scenario 3
Fear of Refactoring
● Early refactoring is crucial
● Not improving the code over time leads to unhealthy platform and bugs
● Bugs take time, rewriting pieces of software consume even more time
● BDD specs protect behavior and encourage refactoring
As a developer, I feel safe knowing there are tests which will ensure behavior
remains intact after my code refactoring
Scenario 4
Rapid Issue Tracing
Scenario 4
Rapid Issue Tracing
● Challenges to reproduce the issue:
○ This is production environment
○ There is a background job generating PDF
○ PDF is sent at the end of the business day
in the email inbox
● We don’t need to setup anything, there is
already cucumber tests for each report
Scenario 4
Rapid Issue Tracing
Scenario 4
Rapid Issue Tracing
Scenario 4
Rapid Issue Tracing
Adding Settlement in July of 2019 - test passes
Removing Settlement from July of 2019 - test fails
Scenario 4
Rapid Issue Tracing
● No need to have production data for debugging - focus is on behavior and
minimal amount of data to represent a behavior
● No need to have complete workflow setup locally - simply play with Cucumber
test
● Ability to validate assumptions running tests with different inputs
● Ability to present and confirm results with PM/PO before applying fix
Scenario 5
Employee Turnover
My experience: Replacing existing search engine within a relatively new team
Scenario 5
Employee Turnover
People leave companies, teams change significantly
Automated specs can serve as a living documentation that remains for new people
Automated specs save you time and avoid angry calls
The one thing you should bring with you from
this talk is...
Never forget about the cucumbers!
Source: https://www.amazon.com/Aahs-Engraving-Morty-STANDUPS-Pickle/dp/B07MGMS9NH
Ivan Lozić, CEO of Deegloo
ivan@deegloo.com
Thank you for your attention.

More Related Content

PDF
Track B-3 解構大數據架構 - 大數據系統的伺服器與網路資源規劃
PPTX
Not all open source is the same
 
PDF
Doing More With Less: The Economics of Open Source Database Adoption
 
PPTX
Riding the Second Wave: Open Source for Relational Databases, Enterprise Post...
 
PPTX
NRB Vmware vForum 2019
 
PPTX
60000 TPS: How many CPUs?, Enterprise Postgres Day
 
PDF
IBM: The Linux Ecosystem
PPTX
ZCX Hybrid Application
Track B-3 解構大數據架構 - 大數據系統的伺服器與網路資源規劃
Not all open source is the same
 
Doing More With Less: The Economics of Open Source Database Adoption
 
Riding the Second Wave: Open Source for Relational Databases, Enterprise Post...
 
NRB Vmware vForum 2019
 
60000 TPS: How many CPUs?, Enterprise Postgres Day
 
IBM: The Linux Ecosystem
ZCX Hybrid Application

What's hot (20)

PPTX
NRB - BE MAINFRAME DAY 2017 - Case Study
 
PPT
AIA 4 Iowa Apps User Group
PDF
Leveraging IoT as part of your digital transformation
PDF
HTAP By Accident: Getting More From PostgreSQL Using Hardware Acceleration
 
PPTX
Comparing Microsoft SQL Server 2019 Performance Across Various Kubernetes Pla...
PDF
Public Sector Virtual Town Hall
 
PDF
1040: OpenPOWER Foundation Update
PDF
OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...
PPTX
Whats New in Postgres 12
 
PDF
Harnessing the virtual realm for successful real world artificial intelligence
PPTX
When HPC meet ML/DL: Manage HPC Data Center with Kubernetes
PDF
Benchmarking Market Pricing
PDF
Cloud Computing Overview
PPTX
Cloud Native Summit 2019 Summary
PDF
No Time to Waste: Migrate from Oracle to EDB Postgres in Minutes
 
PDF
1043: Applications and porting to OpenPOWER
PPTX
In-Memory Computing Essentials for Architects and Engineers
PDF
Zero-to-Hero: Running Postgres in Kubernetes
 
PPTX
Apache Ignite: In-Memory Hammer for Your Data Science Toolkit
PDF
[241] AI 칩 개발에 사용되는 엔지니어링
NRB - BE MAINFRAME DAY 2017 - Case Study
 
AIA 4 Iowa Apps User Group
Leveraging IoT as part of your digital transformation
HTAP By Accident: Getting More From PostgreSQL Using Hardware Acceleration
 
Comparing Microsoft SQL Server 2019 Performance Across Various Kubernetes Pla...
Public Sector Virtual Town Hall
 
1040: OpenPOWER Foundation Update
OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...
Whats New in Postgres 12
 
Harnessing the virtual realm for successful real world artificial intelligence
When HPC meet ML/DL: Manage HPC Data Center with Kubernetes
Benchmarking Market Pricing
Cloud Computing Overview
Cloud Native Summit 2019 Summary
No Time to Waste: Migrate from Oracle to EDB Postgres in Minutes
 
1043: Applications and porting to OpenPOWER
In-Memory Computing Essentials for Architects and Engineers
Zero-to-Hero: Running Postgres in Kubernetes
 
Apache Ignite: In-Memory Hammer for Your Data Science Toolkit
[241] AI 칩 개발에 사용되는 엔지니어링
Ad

Similar to Javantura v7 - Behaviour Driven Development with Cucumber - Ivan Lozić (20)

ODP
Moving to tdd bdd
PDF
Scrum + bdd + ddd
PPTX
Iasi code camp 12 october 2013 corneliu rimboiu - bridging java and .net
PPTX
Prashant technical practices-tdd for xebia event
PDF
Expo qa from user stories to automated acceptance tests with bdd
PDF
German Testing Day 2015 - How behavior-driven development fuses developers an...
PPTX
Building In Quality: The Beauty Of Behavior Driven Development (BDD)
PDF
Testing stage. being ahead business with cucumber
PDF
Legacy code - Taming The Beast
PPTX
Gateway to Agile: XP and BDD
PDF
Introduction to TDD and BDD
PDF
Webinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
PPTX
Technical Debt.pptx
PPTX
BDD - Collaboration for Continuous Delivery
PDF
Pair Programming, TDD and other impractical things
PDF
Emily Bache - Readable, Executable Requirements: Hands-On - EuroSTAR 2013
PDF
Services, tools & practices for a software house
PPTX
SGIN2013-ScrumStartRek-CucumberRecipes-SonikChopra
PPTX
DevOpsDays Jakarta Igites
PDF
Bridging the gap between business and technology - Behaviour Driven Developme...
Moving to tdd bdd
Scrum + bdd + ddd
Iasi code camp 12 october 2013 corneliu rimboiu - bridging java and .net
Prashant technical practices-tdd for xebia event
Expo qa from user stories to automated acceptance tests with bdd
German Testing Day 2015 - How behavior-driven development fuses developers an...
Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Testing stage. being ahead business with cucumber
Legacy code - Taming The Beast
Gateway to Agile: XP and BDD
Introduction to TDD and BDD
Webinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
Technical Debt.pptx
BDD - Collaboration for Continuous Delivery
Pair Programming, TDD and other impractical things
Emily Bache - Readable, Executable Requirements: Hands-On - EuroSTAR 2013
Services, tools & practices for a software house
SGIN2013-ScrumStartRek-CucumberRecipes-SonikChopra
DevOpsDays Jakarta Igites
Bridging the gap between business and technology - Behaviour Driven Developme...
Ad

More from HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association (20)

PDF
Java cro'21 the best tools for java developers in 2021 - hujak
PDF
JavaCro'21 - Java is Here To Stay - HUJAK Keynote
PPTX
Javantura v7 - The State of Java - Today and Tomowwow - HUJAK's Community Key...
PPTX
Javantura v7 - Learning to Scale Yourself: The Journey from Coder to Leader -...
PDF
JavaCro'19 - The State of Java and Software Development in Croatia - Communit...
PDF
Javantura v6 - Java in Croatia and HUJAK - Branko Mihaljević, Aleksander Radovan
PDF
Javantura v6 - On the Aspects of Polyglot Programming and Memory Management i...
PPTX
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
PDF
Javantura v6 - How to help customers report bugs accurately - Miroslav Čerkez...
PDF
Javantura v6 - When remote work really works - the secrets behind successful ...
PDF
Javantura v6 - Kotlin-Java Interop - Matej Vidaković
PDF
Javantura v6 - Spring HATEOAS hypermedia-driven web services, and clients tha...
PDF
Javantura v6 - End to End Continuous Delivery of Microservices for Kubernetes...
PPTX
Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...
PDF
Javantura v6 - How can you improve the quality of your application - Ioannis ...
PDF
Javantura v6 - Automation of web apps testing - Hrvoje Ruhek
PDF
Javantura v6 - Master the Concepts Behind the Java 10 Challenges and Eliminat...
PDF
Javantura v6 - Building IoT Middleware with Microservices - Mario Kusek
PDF
Javantura v6 - JDK 11 & JDK 12 - Dalibor Topic
PDF
Javantura v6 - Java SE, Today and Tomorrow - Dalibor Topic
Java cro'21 the best tools for java developers in 2021 - hujak
JavaCro'21 - Java is Here To Stay - HUJAK Keynote
Javantura v7 - The State of Java - Today and Tomowwow - HUJAK's Community Key...
Javantura v7 - Learning to Scale Yourself: The Journey from Coder to Leader -...
JavaCro'19 - The State of Java and Software Development in Croatia - Communit...
Javantura v6 - Java in Croatia and HUJAK - Branko Mihaljević, Aleksander Radovan
Javantura v6 - On the Aspects of Polyglot Programming and Memory Management i...
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
Javantura v6 - How to help customers report bugs accurately - Miroslav Čerkez...
Javantura v6 - When remote work really works - the secrets behind successful ...
Javantura v6 - Kotlin-Java Interop - Matej Vidaković
Javantura v6 - Spring HATEOAS hypermedia-driven web services, and clients tha...
Javantura v6 - End to End Continuous Delivery of Microservices for Kubernetes...
Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...
Javantura v6 - How can you improve the quality of your application - Ioannis ...
Javantura v6 - Automation of web apps testing - Hrvoje Ruhek
Javantura v6 - Master the Concepts Behind the Java 10 Challenges and Eliminat...
Javantura v6 - Building IoT Middleware with Microservices - Mario Kusek
Javantura v6 - JDK 11 & JDK 12 - Dalibor Topic
Javantura v6 - Java SE, Today and Tomorrow - Dalibor Topic

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
KodekX | Application Modernization Development
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Electronic commerce courselecture one. Pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPT
Teaching material agriculture food technology
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Big Data Technologies - Introduction.pptx
cuic standard and advanced reporting.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Dropbox Q2 2025 Financial Results & Investor Presentation
“AI and Expert System Decision Support & Business Intelligence Systems”
KodekX | Application Modernization Development
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Spectral efficient network and resource selection model in 5G networks
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Unlocking AI with Model Context Protocol (MCP)
MIND Revenue Release Quarter 2 2025 Press Release
Programs and apps: productivity, graphics, security and other tools
Electronic commerce courselecture one. Pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Teaching material agriculture food technology
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Big Data Technologies - Introduction.pptx

Javantura v7 - Behaviour Driven Development with Cucumber - Ivan Lozić

  • 1. Ivan Lozić, CEO of Deegloo BDD with Cucumber ivan@deegloo.com
  • 2. Who am I? - CEO of Deegloo - software agency - Software Engineer with ~10 years of professional experience - .Net, iOS developer, Java - Software Architect - Car Industry, Dairy Industry
  • 3. - Software Development Agency - Developing US Dairy Industry products - Web, Mobile and Data Science Source: Dairy.com What Does Deegloo Do?
  • 4. Behavior Driven Development “Agile Software Development Process which encourages collaboration between developers, QA and non-technical people” Source: Wikipedia
  • 5. User Story As a (type of user), I would like to be able to (do some action), so that I can (achieve some goal or get some result) Acceptance Criteria Scenario: Given … When I ... Then...
  • 6. Collaboration BDD specs are written in simple, descriptive text and are understandable by non-technical people PO/PM, Sales, ...
  • 7. Specification by Example Collaborative approach of... Capturing and illustrating requirements through realistic examples instead of abstract statements So, why does this matter? - Human brains are generally not that great at understanding abstractions
  • 8. How does BDD relate to TDD? Emerged from TDD Both are test first approach BDD focuses on behavior, and not on implementation i.e. BDD tests product from users perspective, instead of testing the code i.e. BDD doesn’t care about how a particular output is created, only that it is correct under specified conditions
  • 9. Cucumber A tool which supports BDD Enables writing specifications Integrates with IntelliJ, Eclipse, Jira, ...
  • 10. Gherkin - Domain specific language - Helps describing business behaviour without going into technical details - Acts like a living documentation Basic Gherkin Syntax ● Feature ● Scenario ● Given ● When ● Then
  • 11. IDE Integration and Test Setup Example with IntelliJ
  • 13. Cucumber + Gherkin It still requires coding :)
  • 14. Cucumber + Gherkin It still requires coding :)
  • 17. Real World Example - FC Tracker is a tool used by brokers allowing for Milk Commodity trading at the Market Exchange - ~1 year of development - We combined JUnit Integration tests and Cucumber specs - 394 Integration tests - 128 Cucumber scenarios in 49 features - All tests running against in-memory H2 database Forward Contracting Tool
  • 18. Real World Example Forward Contracting Tool
  • 20. Real World Example Learnings - Overall a positive experience - It takes initial learning time before becoming productive - Integrating all layers makes sense - Steps are reusable across features, need to be careful about naming them - Choosing correct wording matters to make specs readable
  • 21. BDD and Cucumber Sound Good? Still, not many of us do it in the industry...
  • 22. The Typical Excuse We don’t have enough time to write tests
  • 23. Understood, however... Let’s consider the following scenarios
  • 24. Scenario 1 Cognitive Limitation Human beings are cognitively limited We can process only so much at the particular moment Do we want to focus on identifying behaviors through examples OR do we want to jump into implementation immediately?
  • 25. Scenario 2 Collaborating with PO My experience: working together with PO on defining all acceptance tests for free-text search functionality
  • 26. Scenario 3 Fear of Refactoring Programming is hard… Understanding other people’s (bad) code is even harder...
  • 27. Scenario 3 Fear of Refactoring ● Early refactoring is crucial ● Not improving the code over time leads to unhealthy platform and bugs ● Bugs take time, rewriting pieces of software consume even more time ● BDD specs protect behavior and encourage refactoring As a developer, I feel safe knowing there are tests which will ensure behavior remains intact after my code refactoring
  • 29. Scenario 4 Rapid Issue Tracing ● Challenges to reproduce the issue: ○ This is production environment ○ There is a background job generating PDF ○ PDF is sent at the end of the business day in the email inbox ● We don’t need to setup anything, there is already cucumber tests for each report
  • 32. Scenario 4 Rapid Issue Tracing Adding Settlement in July of 2019 - test passes Removing Settlement from July of 2019 - test fails
  • 33. Scenario 4 Rapid Issue Tracing ● No need to have production data for debugging - focus is on behavior and minimal amount of data to represent a behavior ● No need to have complete workflow setup locally - simply play with Cucumber test ● Ability to validate assumptions running tests with different inputs ● Ability to present and confirm results with PM/PO before applying fix
  • 34. Scenario 5 Employee Turnover My experience: Replacing existing search engine within a relatively new team
  • 35. Scenario 5 Employee Turnover People leave companies, teams change significantly Automated specs can serve as a living documentation that remains for new people Automated specs save you time and avoid angry calls
  • 36. The one thing you should bring with you from this talk is...
  • 37. Never forget about the cucumbers!
  • 39. Ivan Lozić, CEO of Deegloo ivan@deegloo.com Thank you for your attention.