SlideShare a Scribd company logo
Scaffolding a legacy
app with BDD
scenarios
using SpecFlow/Cucumber
HUSTEF 2016, Budapest
24/10/2016
Gáspár Nagy
coach • trainer • bdd addict • creator of specflow
@gasparnagy • gaspar@specsolutions.eu
Copyright © Gaspar Nagy
bdd addict
given.when.then
CAUTION!
bddaddict.com
on the stage
Copyright © Gaspar Nagy
What is BDD?
Copyright © Gaspar Nagy
[HttpPost]
public ActionResult Answer(int answer)
{
TriviaEntities db = new TriviaEntities();
var question = db.FindQuestion(CurrentQuestion);
if (question.Type == QuestionType.Easy)
{
db.AddScore(question, user, 10);
}
else
{
db.AddScore(question, user, 50);
}
var model = new GameModel
{ Score = db.GetScore(question, user) };
return View(model);
}
implement
feedback
Classic model
Copyright © Gaspar Nagy
Scenario: Correct easy answer scores 10
Given I register a team
When I submit a correct easy answer
Then my score should be 10
Collaboration
Automation with
Cucumber/SpecFlow
BDD Process
Copyright © Gaspar Nagy
Test Driven Development
Failing test Make it pass
Make it clean
Copyright © Gaspar Nagy
TDD Cycle
Red Green
Refactor
Copyright © Gaspar Nagy
How can I apply this to
legacy apps?
Copyright © Gaspar Nagy
Working with a legacy app is like
renovating a house…
Renovation can be challenging…
Source: http://kadarkocka.blogspot.com/2011_08_01_archive.html
Copyright © Gaspar Nagy
My Story
The project was delivered in cooperation with TechTalk (www.techtalk.at)
It was modern…
Source: http://irodahaz.info
Complex domain…
106 failing (integration?) tests
Copyright © Gaspar Nagy
… and other challenges
• 17 GB test database
• 46 projects
• 300k lines of code
• >2 minutes build time
Copyright © Gaspar Nagy
What can I do with this?
Copyright © Gaspar Nagy
Source: Wikipedia
Copyright © Gaspar Nagy
The first change request
Deployment –
Workflow
Change request
Source: http://irodahaz.info
We need to replace
that window up
there!
Copyright © Gaspar Nagy
0. Get the infrastructure ready
We need a healthy local dev and CI environment!
• Make a dummy test and get it running!
• Ignore/skip/delete unstable
tests
• Setup the desired testing
model (e.g. SpecFlow)
• Test core dependencies (e.g.
“When I do something with
the database”)
Get the infrastructure ready
Source: http://hfsaustralia.com.au/storage.html
Copyright © Gaspar Nagy
1. Capture current behavior
• Based on the way it was demoed to you
• Do not worry about automation
• Do not worry about details
• Do not worry about exact phrasing
Copyright © Gaspar Nagy
TDD Cycle
Red Green
Refactor
Copyright © Gaspar Nagy
1. Capture current behavior
Red
Copyright © Gaspar Nagy
2. Automate “Then” steps
• Feel free to hard-wire concrete data (IDs)!
Red
Copyright © Gaspar Nagy
3. Automate “When”
with hard-wired data
• We have something to start with!
• (But its obviously nasty with “2347599”)
Green
Copyright © Gaspar Nagy
We’ve got a scaffolding!
Source: Wikipedia
Copyright © Gaspar Nagy
We need to get rid of the hard-wired
data!
1
2
3
4
5
8
9
#6
7
Remove a bit of scaffolding
4. Pick off a bite!
1
2
3
4
5
8
9
#6
7
Aut
#
#’
Copyright © Gaspar Nagy
4. Pick off a bite
Refactor
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
We have scaffolded our application for
implementing this feature!
Copyright © Gaspar Nagy
5. Describe the new feature
Red
Copyright © Gaspar Nagy
6. Automate and implement
it
• You can even forget that your are maintaining a legacy app
here…
Green
Copyright © Gaspar Nagy
7. Pick low hanging fruits
• We have developed an automation interface for a part of
the application
• Can we use it to cover other usual cases?
Copyright © Gaspar Nagy
Red Green
Refactor
Copyright © Gaspar Nagy
Summary: The first change request
• We addressed the system through a new feature
• Ensured that the test infrastructure works
• Scaffolded the app with a test for the current behavior using
hard wired data
• Refactored the automation to eliminate some parts of these
data – taken apart a bit of the scaffolding
• Described and implemented the new feature
• Used the automation infrastructure for further tests
Copyright © Gaspar Nagy
The strategy also works for bugs
1. Capture current behavior
2. Describe bug as a scenario
3. Fix the bug
Copyright © Gaspar Nagy
Working on a legacy app does not mean
that you cannot apply BDD process.
The scenarios can guide you to discover
more and more from the application!
As you learn more, the scaffolding can
be removed…
Copyright © Gaspar Nagy
Happy maintenance!
Gáspár Nagy
coach • trainer • bdd addict • creator of specflow
@gasparnagy • gaspar@specsolutions.eu
Thank you!
bddaddict.com

More Related Content

What's hot

Accelerating Your Test Execution Pipeline
Accelerating Your Test Execution PipelineAccelerating Your Test Execution Pipeline
Accelerating Your Test Execution Pipeline
SmartBear
 
Art of unittesting in OpenStack - Paris 2014
Art of unittesting in OpenStack - Paris 2014Art of unittesting in OpenStack - Paris 2014
Art of unittesting in OpenStack - Paris 2014
chmouel
 
Feature Flagging to Reduce Risk in Database Migrations
Feature Flagging to Reduce Risk in Database MigrationsFeature Flagging to Reduce Risk in Database Migrations
Feature Flagging to Reduce Risk in Database Migrations
Patrick Kaeding
 
Tools & Preparations
Tools & PreparationsTools & Preparations
Tools & Preparations
Ali Sattari
 
Continuously Integrating Distributed Code at Netflix
Continuously Integrating Distributed Code at NetflixContinuously Integrating Distributed Code at Netflix
Continuously Integrating Distributed Code at Netflix
Atlassian
 
ATAGTR2017 CDC Tests - Integration Tests cant be made simpler than this!
ATAGTR2017 CDC Tests - Integration Tests cant be made simpler than this!ATAGTR2017 CDC Tests - Integration Tests cant be made simpler than this!
ATAGTR2017 CDC Tests - Integration Tests cant be made simpler than this!
Agile Testing Alliance
 
Web Performance Lightning Talk
Web Performance Lightning TalkWeb Performance Lightning Talk
Web Performance Lightning Talk
Hardik Shah
 
Four Practices to Fix Your Top .NET Performance Problems
Four Practices to Fix Your Top .NET Performance ProblemsFour Practices to Fix Your Top .NET Performance Problems
Four Practices to Fix Your Top .NET Performance Problems
Andreas Grabner
 
Moving QA from Reactive to Proactive with qTest
Moving QA from Reactive to Proactive  with qTestMoving QA from Reactive to Proactive  with qTest
Moving QA from Reactive to Proactive with qTest
QASymphony
 
DOES16 San Francisco - David Blank-Edelman - Lessons Learned from a Parallel ...
DOES16 San Francisco - David Blank-Edelman - Lessons Learned from a Parallel ...DOES16 San Francisco - David Blank-Edelman - Lessons Learned from a Parallel ...
DOES16 San Francisco - David Blank-Edelman - Lessons Learned from a Parallel ...
Gene Kim
 
Shift-Left Testing: QA in a DevOps World by David Laulusa
Shift-Left Testing: QA in a DevOps World by David LaulusaShift-Left Testing: QA in a DevOps World by David Laulusa
Shift-Left Testing: QA in a DevOps World by David Laulusa
QA or the Highway
 
Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...
Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...
Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...
Andreas Grabner
 
Boston DevOps Days 2016: Implementing Metrics Driven DevOps - Why and How
Boston DevOps Days 2016: Implementing Metrics Driven DevOps - Why and HowBoston DevOps Days 2016: Implementing Metrics Driven DevOps - Why and How
Boston DevOps Days 2016: Implementing Metrics Driven DevOps - Why and How
Andreas Grabner
 
MHA2018 - Jen Krieger - Getting Started with Kanban
MHA2018 - Jen Krieger - Getting Started with KanbanMHA2018 - Jen Krieger - Getting Started with Kanban
MHA2018 - Jen Krieger - Getting Started with Kanban
AgileDenver
 
QASymphony Atlanta Customer User Group Fall 2017
QASymphony Atlanta Customer User Group Fall 2017QASymphony Atlanta Customer User Group Fall 2017
QASymphony Atlanta Customer User Group Fall 2017
QASymphony
 
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
Andreas Grabner
 
Serverless computing henry been - logging instrumentation dashboards alerts
Serverless computing   henry been - logging instrumentation dashboards alertsServerless computing   henry been - logging instrumentation dashboards alerts
Serverless computing henry been - logging instrumentation dashboards alerts
Henry Been
 
DOES SFO 2016 San Francisco - Julia Wester - Predictability: No Magic Required
DOES SFO 2016 San Francisco - Julia Wester - Predictability: No Magic RequiredDOES SFO 2016 San Francisco - Julia Wester - Predictability: No Magic Required
DOES SFO 2016 San Francisco - Julia Wester - Predictability: No Magic Required
Gene Kim
 
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and ScalabiltyDocker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
Andreas Grabner
 
Modern Front End Tools & Workflow
Modern Front End Tools & WorkflowModern Front End Tools & Workflow
Modern Front End Tools & Workflow
Adir Amsalem
 

What's hot (20)

Accelerating Your Test Execution Pipeline
Accelerating Your Test Execution PipelineAccelerating Your Test Execution Pipeline
Accelerating Your Test Execution Pipeline
 
Art of unittesting in OpenStack - Paris 2014
Art of unittesting in OpenStack - Paris 2014Art of unittesting in OpenStack - Paris 2014
Art of unittesting in OpenStack - Paris 2014
 
Feature Flagging to Reduce Risk in Database Migrations
Feature Flagging to Reduce Risk in Database MigrationsFeature Flagging to Reduce Risk in Database Migrations
Feature Flagging to Reduce Risk in Database Migrations
 
Tools & Preparations
Tools & PreparationsTools & Preparations
Tools & Preparations
 
Continuously Integrating Distributed Code at Netflix
Continuously Integrating Distributed Code at NetflixContinuously Integrating Distributed Code at Netflix
Continuously Integrating Distributed Code at Netflix
 
ATAGTR2017 CDC Tests - Integration Tests cant be made simpler than this!
ATAGTR2017 CDC Tests - Integration Tests cant be made simpler than this!ATAGTR2017 CDC Tests - Integration Tests cant be made simpler than this!
ATAGTR2017 CDC Tests - Integration Tests cant be made simpler than this!
 
Web Performance Lightning Talk
Web Performance Lightning TalkWeb Performance Lightning Talk
Web Performance Lightning Talk
 
Four Practices to Fix Your Top .NET Performance Problems
Four Practices to Fix Your Top .NET Performance ProblemsFour Practices to Fix Your Top .NET Performance Problems
Four Practices to Fix Your Top .NET Performance Problems
 
Moving QA from Reactive to Proactive with qTest
Moving QA from Reactive to Proactive  with qTestMoving QA from Reactive to Proactive  with qTest
Moving QA from Reactive to Proactive with qTest
 
DOES16 San Francisco - David Blank-Edelman - Lessons Learned from a Parallel ...
DOES16 San Francisco - David Blank-Edelman - Lessons Learned from a Parallel ...DOES16 San Francisco - David Blank-Edelman - Lessons Learned from a Parallel ...
DOES16 San Francisco - David Blank-Edelman - Lessons Learned from a Parallel ...
 
Shift-Left Testing: QA in a DevOps World by David Laulusa
Shift-Left Testing: QA in a DevOps World by David LaulusaShift-Left Testing: QA in a DevOps World by David Laulusa
Shift-Left Testing: QA in a DevOps World by David Laulusa
 
Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...
Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...
Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...
 
Boston DevOps Days 2016: Implementing Metrics Driven DevOps - Why and How
Boston DevOps Days 2016: Implementing Metrics Driven DevOps - Why and HowBoston DevOps Days 2016: Implementing Metrics Driven DevOps - Why and How
Boston DevOps Days 2016: Implementing Metrics Driven DevOps - Why and How
 
MHA2018 - Jen Krieger - Getting Started with Kanban
MHA2018 - Jen Krieger - Getting Started with KanbanMHA2018 - Jen Krieger - Getting Started with Kanban
MHA2018 - Jen Krieger - Getting Started with Kanban
 
QASymphony Atlanta Customer User Group Fall 2017
QASymphony Atlanta Customer User Group Fall 2017QASymphony Atlanta Customer User Group Fall 2017
QASymphony Atlanta Customer User Group Fall 2017
 
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
 
Serverless computing henry been - logging instrumentation dashboards alerts
Serverless computing   henry been - logging instrumentation dashboards alertsServerless computing   henry been - logging instrumentation dashboards alerts
Serverless computing henry been - logging instrumentation dashboards alerts
 
DOES SFO 2016 San Francisco - Julia Wester - Predictability: No Magic Required
DOES SFO 2016 San Francisco - Julia Wester - Predictability: No Magic RequiredDOES SFO 2016 San Francisco - Julia Wester - Predictability: No Magic Required
DOES SFO 2016 San Francisco - Julia Wester - Predictability: No Magic Required
 
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and ScalabiltyDocker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
 
Modern Front End Tools & Workflow
Modern Front End Tools & WorkflowModern Front End Tools & Workflow
Modern Front End Tools & Workflow
 

Viewers also liked

Folyamatos integráció és kódépítés (ALM Day Budapest, 24/11/2015, Hungarian)
Folyamatos integráció és kódépítés (ALM Day Budapest, 24/11/2015, Hungarian)Folyamatos integráció és kódépítés (ALM Day Budapest, 24/11/2015, Hungarian)
Folyamatos integráció és kódépítés (ALM Day Budapest, 24/11/2015, Hungarian)
Gáspár Nagy
 
Given/When/Then-ready sprint planning (Agile Tour Vienna 2015)
Given/When/Then-ready sprint planning (Agile Tour Vienna 2015)Given/When/Then-ready sprint planning (Agile Tour Vienna 2015)
Given/When/Then-ready sprint planning (Agile Tour Vienna 2015)
Gáspár Nagy
 
The Power of Visuals
The Power of VisualsThe Power of Visuals
The Power of Visuals
Ádám Nagy
 
Introducing BDD to Legacy Applications with SpecFlow/Cucumber (Agilia Confere...
Introducing BDD to Legacy Applications with SpecFlow/Cucumber (Agilia Confere...Introducing BDD to Legacy Applications with SpecFlow/Cucumber (Agilia Confere...
Introducing BDD to Legacy Applications with SpecFlow/Cucumber (Agilia Confere...
Gáspár Nagy
 
Property Based BDD Examples (ETSI UCAAT 2016, Budapest)
Property Based BDD Examples (ETSI UCAAT 2016, Budapest)Property Based BDD Examples (ETSI UCAAT 2016, Budapest)
Property Based BDD Examples (ETSI UCAAT 2016, Budapest)
Gáspár Nagy
 
Given/When/Then-ready sprint planning with Example Mapping (Agilia Budapest 2...
Given/When/Then-ready sprint planning with Example Mapping (Agilia Budapest 2...Given/When/Then-ready sprint planning with Example Mapping (Agilia Budapest 2...
Given/When/Then-ready sprint planning with Example Mapping (Agilia Budapest 2...
Gáspár Nagy
 
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
Gáspár Nagy
 

Viewers also liked (7)

Folyamatos integráció és kódépítés (ALM Day Budapest, 24/11/2015, Hungarian)
Folyamatos integráció és kódépítés (ALM Day Budapest, 24/11/2015, Hungarian)Folyamatos integráció és kódépítés (ALM Day Budapest, 24/11/2015, Hungarian)
Folyamatos integráció és kódépítés (ALM Day Budapest, 24/11/2015, Hungarian)
 
Given/When/Then-ready sprint planning (Agile Tour Vienna 2015)
Given/When/Then-ready sprint planning (Agile Tour Vienna 2015)Given/When/Then-ready sprint planning (Agile Tour Vienna 2015)
Given/When/Then-ready sprint planning (Agile Tour Vienna 2015)
 
The Power of Visuals
The Power of VisualsThe Power of Visuals
The Power of Visuals
 
Introducing BDD to Legacy Applications with SpecFlow/Cucumber (Agilia Confere...
Introducing BDD to Legacy Applications with SpecFlow/Cucumber (Agilia Confere...Introducing BDD to Legacy Applications with SpecFlow/Cucumber (Agilia Confere...
Introducing BDD to Legacy Applications with SpecFlow/Cucumber (Agilia Confere...
 
Property Based BDD Examples (ETSI UCAAT 2016, Budapest)
Property Based BDD Examples (ETSI UCAAT 2016, Budapest)Property Based BDD Examples (ETSI UCAAT 2016, Budapest)
Property Based BDD Examples (ETSI UCAAT 2016, Budapest)
 
Given/When/Then-ready sprint planning with Example Mapping (Agilia Budapest 2...
Given/When/Then-ready sprint planning with Example Mapping (Agilia Budapest 2...Given/When/Then-ready sprint planning with Example Mapping (Agilia Budapest 2...
Given/When/Then-ready sprint planning with Example Mapping (Agilia Budapest 2...
 
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
 

Similar to Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (HUSTEF 2016, Budapest, 24/10/2016)

Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)
Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)
Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)
Gáspár Nagy
 
BDD Scenarios in a Testing Strategy
BDD Scenarios in a Testing StrategyBDD Scenarios in a Testing Strategy
BDD Scenarios in a Testing Strategy
Gáspár Nagy
 
Sync Workitems between multiple Team Projects #vssatpn
Sync Workitems between multiple Team Projects #vssatpnSync Workitems between multiple Team Projects #vssatpn
Sync Workitems between multiple Team Projects #vssatpn
Lorenzo Barbieri
 
Performant Django - Ara Anjargolian
Performant Django - Ara AnjargolianPerformant Django - Ara Anjargolian
Performant Django - Ara Anjargolian
Hakka Labs
 
Droidcon Paris 2015
Droidcon Paris 2015Droidcon Paris 2015
Droidcon Paris 2015
Renaud Boulard
 
Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!
Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!
Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!
Lorenzo Barbieri
 
JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...
JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...
JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...
Daniel Bryant
 
Tools and best practices for sustainable software
Tools and best practices for sustainable softwareTools and best practices for sustainable software
Tools and best practices for sustainable software
Green Software Development
 
Tools and best practices for sustainable software.pdf
Tools and best practices for sustainable software.pdfTools and best practices for sustainable software.pdf
Tools and best practices for sustainable software.pdf
GeorgMolz
 
Tools and best practices for sustainable software.pdf
Tools and best practices for sustainable software.pdfTools and best practices for sustainable software.pdf
Tools and best practices for sustainable software.pdf
GeorgMolz
 
Cloud native development without the toil
Cloud native development without the toilCloud native development without the toil
Cloud native development without the toil
Ambassador Labs
 
GOTOpia 2/2021 "Cloud Native Development Without the Toil: An Overview of Pra...
GOTOpia 2/2021 "Cloud Native Development Without the Toil: An Overview of Pra...GOTOpia 2/2021 "Cloud Native Development Without the Toil: An Overview of Pra...
GOTOpia 2/2021 "Cloud Native Development Without the Toil: An Overview of Pra...
Daniel Bryant
 
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...
DataWorks Summit
 
MongoDB World 2019: DIY Glucose Monitoring with Open Source, MongoDB, and GCP
MongoDB World 2019: DIY Glucose Monitoring with Open Source, MongoDB, and GCPMongoDB World 2019: DIY Glucose Monitoring with Open Source, MongoDB, and GCP
MongoDB World 2019: DIY Glucose Monitoring with Open Source, MongoDB, and GCP
MongoDB
 
Adding GraphQL to your existing architecture
Adding GraphQL to your existing architectureAdding GraphQL to your existing architecture
Adding GraphQL to your existing architecture
Sashko Stubailo
 
Intro To Django
Intro To DjangoIntro To Django
Intro To Django
Udi Bauman
 
DOES14 - Scott Prugh - CSG - DevOps and Lean in Legacy Environments
DOES14 - Scott Prugh - CSG - DevOps and Lean in Legacy EnvironmentsDOES14 - Scott Prugh - CSG - DevOps and Lean in Legacy Environments
DOES14 - Scott Prugh - CSG - DevOps and Lean in Legacy Environments
Gene Kim
 
Continuous Delivery: The Dirty Details
Continuous Delivery: The Dirty DetailsContinuous Delivery: The Dirty Details
Continuous Delivery: The Dirty Details
Mike Brittain
 
Making operations visible - Nick Gallbreath
Making operations visible - Nick GallbreathMaking operations visible - Nick Gallbreath
Making operations visible - Nick GallbreathDevopsdays
 
2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with Blackfire2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with Blackfire
Marko Mitranić
 

Similar to Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (HUSTEF 2016, Budapest, 24/10/2016) (20)

Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)
Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)
Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)
 
BDD Scenarios in a Testing Strategy
BDD Scenarios in a Testing StrategyBDD Scenarios in a Testing Strategy
BDD Scenarios in a Testing Strategy
 
Sync Workitems between multiple Team Projects #vssatpn
Sync Workitems between multiple Team Projects #vssatpnSync Workitems between multiple Team Projects #vssatpn
Sync Workitems between multiple Team Projects #vssatpn
 
Performant Django - Ara Anjargolian
Performant Django - Ara AnjargolianPerformant Django - Ara Anjargolian
Performant Django - Ara Anjargolian
 
Droidcon Paris 2015
Droidcon Paris 2015Droidcon Paris 2015
Droidcon Paris 2015
 
Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!
Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!
Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!
 
JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...
JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...
JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...
 
Tools and best practices for sustainable software
Tools and best practices for sustainable softwareTools and best practices for sustainable software
Tools and best practices for sustainable software
 
Tools and best practices for sustainable software.pdf
Tools and best practices for sustainable software.pdfTools and best practices for sustainable software.pdf
Tools and best practices for sustainable software.pdf
 
Tools and best practices for sustainable software.pdf
Tools and best practices for sustainable software.pdfTools and best practices for sustainable software.pdf
Tools and best practices for sustainable software.pdf
 
Cloud native development without the toil
Cloud native development without the toilCloud native development without the toil
Cloud native development without the toil
 
GOTOpia 2/2021 "Cloud Native Development Without the Toil: An Overview of Pra...
GOTOpia 2/2021 "Cloud Native Development Without the Toil: An Overview of Pra...GOTOpia 2/2021 "Cloud Native Development Without the Toil: An Overview of Pra...
GOTOpia 2/2021 "Cloud Native Development Without the Toil: An Overview of Pra...
 
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...
 
MongoDB World 2019: DIY Glucose Monitoring with Open Source, MongoDB, and GCP
MongoDB World 2019: DIY Glucose Monitoring with Open Source, MongoDB, and GCPMongoDB World 2019: DIY Glucose Monitoring with Open Source, MongoDB, and GCP
MongoDB World 2019: DIY Glucose Monitoring with Open Source, MongoDB, and GCP
 
Adding GraphQL to your existing architecture
Adding GraphQL to your existing architectureAdding GraphQL to your existing architecture
Adding GraphQL to your existing architecture
 
Intro To Django
Intro To DjangoIntro To Django
Intro To Django
 
DOES14 - Scott Prugh - CSG - DevOps and Lean in Legacy Environments
DOES14 - Scott Prugh - CSG - DevOps and Lean in Legacy EnvironmentsDOES14 - Scott Prugh - CSG - DevOps and Lean in Legacy Environments
DOES14 - Scott Prugh - CSG - DevOps and Lean in Legacy Environments
 
Continuous Delivery: The Dirty Details
Continuous Delivery: The Dirty DetailsContinuous Delivery: The Dirty Details
Continuous Delivery: The Dirty Details
 
Making operations visible - Nick Gallbreath
Making operations visible - Nick GallbreathMaking operations visible - Nick Gallbreath
Making operations visible - Nick Gallbreath
 
2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with Blackfire2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with Blackfire
 

More from Gáspár Nagy

Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Gáspár Nagy
 
Ramp up your testing solution, ExpoQA 2023
Ramp up your testing solution, ExpoQA 2023Ramp up your testing solution, ExpoQA 2023
Ramp up your testing solution, ExpoQA 2023
Gáspár Nagy
 
Fighting against technical debt (CukenFest 2020)
Fighting against technical debt (CukenFest 2020)Fighting against technical debt (CukenFest 2020)
Fighting against technical debt (CukenFest 2020)
Gáspár Nagy
 
Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...
Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...
Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...
Gáspár Nagy
 
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
Gáspár Nagy
 
Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)
Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)
Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)
Gáspár Nagy
 
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Gáspár Nagy
 
A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...
A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...
A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...
Gáspár Nagy
 

More from Gáspár Nagy (8)

Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
 
Ramp up your testing solution, ExpoQA 2023
Ramp up your testing solution, ExpoQA 2023Ramp up your testing solution, ExpoQA 2023
Ramp up your testing solution, ExpoQA 2023
 
Fighting against technical debt (CukenFest 2020)
Fighting against technical debt (CukenFest 2020)Fighting against technical debt (CukenFest 2020)
Fighting against technical debt (CukenFest 2020)
 
Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...
Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...
Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...
 
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
 
Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)
Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)
Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)
 
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
 
A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...
A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...
A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...
 

Recently uploaded

Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 

Recently uploaded (20)

Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 

Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (HUSTEF 2016, Budapest, 24/10/2016)

  • 1. Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber HUSTEF 2016, Budapest 24/10/2016 Gáspár Nagy coach • trainer • bdd addict • creator of specflow @gasparnagy • gaspar@specsolutions.eu
  • 2. Copyright © Gaspar Nagy bdd addict given.when.then CAUTION! bddaddict.com on the stage
  • 3. Copyright © Gaspar Nagy What is BDD?
  • 4. Copyright © Gaspar Nagy [HttpPost] public ActionResult Answer(int answer) { TriviaEntities db = new TriviaEntities(); var question = db.FindQuestion(CurrentQuestion); if (question.Type == QuestionType.Easy) { db.AddScore(question, user, 10); } else { db.AddScore(question, user, 50); } var model = new GameModel { Score = db.GetScore(question, user) }; return View(model); } implement feedback Classic model
  • 5. Copyright © Gaspar Nagy Scenario: Correct easy answer scores 10 Given I register a team When I submit a correct easy answer Then my score should be 10 Collaboration Automation with Cucumber/SpecFlow BDD Process
  • 6. Copyright © Gaspar Nagy Test Driven Development Failing test Make it pass Make it clean
  • 7. Copyright © Gaspar Nagy TDD Cycle Red Green Refactor
  • 8. Copyright © Gaspar Nagy How can I apply this to legacy apps?
  • 9. Copyright © Gaspar Nagy Working with a legacy app is like renovating a house…
  • 10. Renovation can be challenging… Source: http://kadarkocka.blogspot.com/2011_08_01_archive.html
  • 11. Copyright © Gaspar Nagy My Story The project was delivered in cooperation with TechTalk (www.techtalk.at)
  • 12. It was modern… Source: http://irodahaz.info
  • 15. Copyright © Gaspar Nagy … and other challenges • 17 GB test database • 46 projects • 300k lines of code • >2 minutes build time
  • 16. Copyright © Gaspar Nagy What can I do with this?
  • 19. Copyright © Gaspar Nagy The first change request
  • 21. Change request Source: http://irodahaz.info We need to replace that window up there!
  • 22. Copyright © Gaspar Nagy 0. Get the infrastructure ready We need a healthy local dev and CI environment! • Make a dummy test and get it running! • Ignore/skip/delete unstable tests • Setup the desired testing model (e.g. SpecFlow) • Test core dependencies (e.g. “When I do something with the database”)
  • 23. Get the infrastructure ready Source: http://hfsaustralia.com.au/storage.html
  • 24. Copyright © Gaspar Nagy 1. Capture current behavior • Based on the way it was demoed to you • Do not worry about automation • Do not worry about details • Do not worry about exact phrasing
  • 25. Copyright © Gaspar Nagy TDD Cycle Red Green Refactor
  • 26. Copyright © Gaspar Nagy 1. Capture current behavior Red
  • 27. Copyright © Gaspar Nagy 2. Automate “Then” steps • Feel free to hard-wire concrete data (IDs)! Red
  • 28. Copyright © Gaspar Nagy 3. Automate “When” with hard-wired data • We have something to start with! • (But its obviously nasty with “2347599”) Green
  • 30. We’ve got a scaffolding! Source: Wikipedia
  • 31. Copyright © Gaspar Nagy We need to get rid of the hard-wired data!
  • 33. Remove a bit of scaffolding
  • 34. 4. Pick off a bite! 1 2 3 4 5 8 9 #6 7 Aut # #’
  • 35. Copyright © Gaspar Nagy 4. Pick off a bite Refactor
  • 37. Copyright © Gaspar Nagy We have scaffolded our application for implementing this feature!
  • 38. Copyright © Gaspar Nagy 5. Describe the new feature Red
  • 39. Copyright © Gaspar Nagy 6. Automate and implement it • You can even forget that your are maintaining a legacy app here… Green
  • 40. Copyright © Gaspar Nagy 7. Pick low hanging fruits • We have developed an automation interface for a part of the application • Can we use it to cover other usual cases?
  • 41. Copyright © Gaspar Nagy Red Green Refactor
  • 42. Copyright © Gaspar Nagy Summary: The first change request • We addressed the system through a new feature • Ensured that the test infrastructure works • Scaffolded the app with a test for the current behavior using hard wired data • Refactored the automation to eliminate some parts of these data – taken apart a bit of the scaffolding • Described and implemented the new feature • Used the automation infrastructure for further tests
  • 43. Copyright © Gaspar Nagy The strategy also works for bugs 1. Capture current behavior 2. Describe bug as a scenario 3. Fix the bug
  • 44. Copyright © Gaspar Nagy Working on a legacy app does not mean that you cannot apply BDD process. The scenarios can guide you to discover more and more from the application! As you learn more, the scaffolding can be removed…
  • 45. Copyright © Gaspar Nagy Happy maintenance!
  • 46. Gáspár Nagy coach • trainer • bdd addict • creator of specflow @gasparnagy • gaspar@specsolutions.eu Thank you! bddaddict.com