SlideShare une entreprise Scribd logo
1  sur  39
Télécharger pour lire hors ligne
@wouterla #lascot @karelboekhout
Ca$h to conc€pt
Bringing a legacy system under test
@wouterla #lascot @karelboekhout
Who are we?
Karel Boekhout
@karelboekhout
Wouter Lagerweij
@wouterla
2
@wouterla #lascot @karelboekhout
You know this one...
3
Source: Jeff Patton
@wouterla #lascot @karelboekhout
Let’s create this one!
4
Why?
● Usually not greenfields, but a big ball of legacy application
● No tests available
● Practical: you can start today
@wouterla #lascot @karelboekhout 5
What
does this
%^)#$
application do?
Let’s start with a
Mental Breakdown
What do we have?
What does it do?
Will it keep
working?
Does it do
what you
think it
does?
Do you care?
@wouterla #lascot @karelboekhout
Our example
6
Let’s start with a
Functional Breakdown
@wouterla #lascot @karelboekhout
Spotify: Home
7
Home screen
<suggestions>
More of what you like
Made for ….
Keep the vibe going
Recently played
Mood
Your heavy rotation
@wouterla #lascot @karelboekhout
Spotify: Search
8
Search
Browse all
Your top genres
Search bar
@wouterla #lascot @karelboekhout
Spotify: Library
9
Your Library
Songs
Stations
Playlists
Made for You
Albums
Artists
Podcasts
Settings
Recently Played
Profile
@wouterla #lascot @karelboekhout
Spotify: Play
10
Player
Manage devices
Artist
Player controls
TitleAdd to my library
Share to socials
Cover
Playlist
Extra actions
Back to Home
Behind the lyrics
@wouterla #lascot @karelboekhout
Start a ‘Heatmap’
The Functional Breakdown
Colour coded for the testing we have available
The Heatmap
● Our overview for the level of control over our system:
○ What are we testing?
○ How are we testing it?
11
@wouterla #lascot @karelboekhout
Example of advanced Heatmap
12
@wouterla #lascot @karelboekhout
Heatmap
13
Home
Search
Library
Play
These are the created tests.
We trust they are well executed. 😇
@wouterla #lascot @karelboekhout
Choose or lose: Priorities
Recent: new features, new areas of code are more vulnerable
Core: essential functions must continue to work
Risk: some areas of an application pose more risk
Configuration sensitive: code dependent on settings can be vulnerable
Repaired: bug fixes can introduce new issues
Chronic: some areas in an application may be perpetually sensitive to breaking
RCRCRC by Karen Johnson, via Matt Heusser
14
We pick Search
@wouterla #lascot @karelboekhout
Back to the Heatmap
15
Search
Home
Library
Playlist
Manage Playlist
Play
@wouterla #lascot @karelboekhout
What is a Story Map?
16
● Follow the flow through the application (user activities)
● Specific User Stories in that flow (detailed actions)
● Slices (things that go well together)
● Priority (what do we do/test first?)
● Difference with building new functionality:
○ Priorities
○ Testing effort instead of implementation effort
○ Dependencies
○ Granularity
○ We know more!
User Story Mapping by Jeff Patton
@wouterla #lascot @karelboekhout
Our Story Map of Manage Playlist
17
Create and play
Find and edit
Sort
Share
Later
@wouterla #lascot @karelboekhout
Back to the Heatmap
18
Search
Home
Create and play
Library
Playlist
Manage Playlist
Play
Find and edit
Sort
Share
@wouterla #lascot @karelboekhout
How to make a Story Map
● We start with flow horizontally (orange)
● Each step in the flow can have multiple stories (yellow)
● Use the vertical to create different levels of priority (slices) (pink)
● Make each horizontal ‘slice’ something you can give a name to
● We do this together (three amigos)
19
@wouterla #lascot @karelboekhout
Story Mapping of Spotify Search
20
Search
Browse all
Your top genres
Search bar
Now you try!
Recent
Core
Risk
Configuration sensitive
Repaired
Chronic
@wouterla #lascot @karelboekhout
Story Mapping: let’s discuss!
● Do you have slices?
● Can you name each slice?
● Why in this order?
21
@wouterla #lascot @karelboekhout
Using the outcomes of Story Map
● Each slice can be named as a separate box in the functional overview
● Each separate box can be an end-to-end test
● Actually creating those tests turns the heatmap yellow
● Stories generated can be starting points for more detailed exploration
22
Validation
Automated E2E
Low Level
Unknown
Manual
@wouterla #lascot @karelboekhout
Back to the Heatmap
23
Validation
Automated E2E
Low Level
Unknown
Manual
Search
Home
Create and play
Library
Playlist
Manage Playlist
Play
Find and edit
Sort
Share
@wouterla #lascot @karelboekhout
Validation
Each slice from the Story Map can be a test
Search for a Song
<assumes app opened, user logged in>
Go to Search
Search for (part of) a Song’s name
Tap the Song to start it playing
24
@wouterla #lascot @karelboekhout
Validation
Each slice from the Story Map can be a test
Recent Searches
Go to Search
Search for any term
Go back to Home
Go back to Search
See term appear on top of Recent Searches
Delete term from Recent Searches
Check by restarting Search
Delete all items from Recent Searches
Check by restarting Search
25
@wouterla #lascot @karelboekhout
Automate?
Wait.
We’re finding out what functionality there is to be tested
Let humans test, don’t restrict them more than necessary
Once you’ve discovered what is interesting about the functionality, maybe,
automate
Or, better, go into detail with an example map to get more high resolution tests
26
@wouterla #lascot @karelboekhout
Back to the Heatmap
27
Validation
Automated E2E
Low Level
Unknown
Manual
Search
Home
Create and play
Library
Playlist
Manage Playlist
Play
Find and edit
Sort
Share
@wouterla #lascot @karelboekhout
Validation
● High-level, low resolution, human end-to-end testing
● High-level, low resolution, automated end-to-end testing
● Low-level, high resolution, automated example based tests
28
Validation
Automated E2E
Low Level
Unknown
Manual
@wouterla #lascot @karelboekhout
Validation: Example Mapping
For a story:
- List the business rules
- Provide examples that illustrate the rule
- Capture open questions
Centered around business rules
Examples can be formalised (in Gherkin, or otherwise) in the form of a test:
Input -> Action -> Outcome (Given/When/Then, Arrange/Act/Assert)
29
Example Mapping by Matt Wynne
@wouterla #lascot @karelboekhout 30
Validation: Example Mapping
@wouterla #lascot @karelboekhout
Examples of Examples
31
@wouterla #lascot @karelboekhout
Example Mapping
32
Now you try!
@wouterla #lascot @karelboekhout
Example Mapping
Let’s discuss!
33
@wouterla #lascot @karelboekhout
Examples can be formalised into Scenarios
Scenario: Playlist without name is auto-numbered
Given existing Playlists
| My Playlist #1 |
| My Playlist #2 |
When a new playlist without name is added
Then that new playlist is given the name ‘My Playlist #3’
Scenario: Playlist without name gets next available slot
Given existing Playlists
| My Playlist #1 |
| My Playlist #3 |
When a new playlist without name is added
Then that new playlist is given the name ‘My Playlist #2’
34
@wouterla #lascot @karelboekhout
pseudocode
Scenarios are implemented at same level the
functionality lives
Scenario: Playlist without name is auto-numbered
Given existing Playlists
| My Playlist #1 |
| My Playlist #2 |
When a new playlist without name is added
Then that new playlist is given the name ‘My Playlist #3’
function testPlaylistNameAutoNumber() {
playlists.addAll(‘My Playlist #1’, ‘My Playlists #2’)
playlists.add(‘’)
expect(playlists.getAll()).toContain(‘My Playlist #3’)
}
35
@wouterla #lascot @karelboekhout
Back to the Heatmap
36
Validation
Automated E2E
Low Level
Unknown
Manual
Search
Home
Create and play
Library
Playlist
Manage Playlist
Play
Find and edit
Sort
Share
@wouterla #lascot @karelboekhout
Future?
Test Result
Failed
Attention
😄
37
Validation
Automated E2E
Low Level
Unknown
Manual
Search
Home
Create and play
Library
Playlist
Manage Playlist
Play
Find and edit
Sort
Share
@wouterla #lascot @karelboekhout
Takeaways: Get back in control
○ What does it do? (functional breakdown)
○ Is it tested? (heatmap)
○ Go broad for overview (Story Map, manual/e2e tests)
○ Dive deep where necessary (Example Map, detailed tests)
○ Iterate!
38
@wouterla #lascot @karelboekhout 39
Thank you!
And...
If you have a problem
If no one else can help
This is how you find us:
wouter@lagerweij.com
karel@hedgefields.com

Contenu connexe

Plus de Wouter Lagerweij

Plus de Wouter Lagerweij (9)

Testing in a continuous delivery world - XP Days Ukraine
Testing in a continuous delivery world  - XP Days UkraineTesting in a continuous delivery world  - XP Days Ukraine
Testing in a continuous delivery world - XP Days Ukraine
 
The sprint goal as a business test
The sprint goal as a business testThe sprint goal as a business test
The sprint goal as a business test
 
Testing in a continuous delivery world - Lean Agile Scotland
Testing in a continuous delivery world - Lean Agile ScotlandTesting in a continuous delivery world - Lean Agile Scotland
Testing in a continuous delivery world - Lean Agile Scotland
 
Testing in a continuous delivery world
Testing in a continuous delivery worldTesting in a continuous delivery world
Testing in a continuous delivery world
 
Why user stories
Why user storiesWhy user stories
Why user stories
 
INVEST
INVESTINVEST
INVEST
 
Kanban
KanbanKanban
Kanban
 
Technical excellence 20120119
Technical excellence 20120119Technical excellence 20120119
Technical excellence 20120119
 
Coding Dojo In 5 minutes
Coding Dojo In 5 minutesCoding Dojo In 5 minutes
Coding Dojo In 5 minutes
 

Dernier

Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Lisi Hocke
 

Dernier (20)

What is a Recruitment Management Software?
What is a Recruitment Management Software?What is a Recruitment Management Software?
What is a Recruitment Management Software?
 
^Clinic ^%[+27788225528*Abortion Pills For Sale In harare
^Clinic ^%[+27788225528*Abortion Pills For Sale In harare^Clinic ^%[+27788225528*Abortion Pills For Sale In harare
^Clinic ^%[+27788225528*Abortion Pills For Sale In harare
 
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AI
 
^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto
^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto
^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto
 
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
 
^Clinic ^%[+27788225528*Abortion Pills For Sale In birch acres
^Clinic ^%[+27788225528*Abortion Pills For Sale In birch acres^Clinic ^%[+27788225528*Abortion Pills For Sale In birch acres
^Clinic ^%[+27788225528*Abortion Pills For Sale In birch acres
 
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)
 
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
 
Sinoville Clinic ](+27832195400*)[🏥Abortion Pill Prices Sinoville ● Women's A...
Sinoville Clinic ](+27832195400*)[🏥Abortion Pill Prices Sinoville ● Women's A...Sinoville Clinic ](+27832195400*)[🏥Abortion Pill Prices Sinoville ● Women's A...
Sinoville Clinic ](+27832195400*)[🏥Abortion Pill Prices Sinoville ● Women's A...
 
Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
 
Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...
Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...
Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...
 
architecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdfarchitecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdf
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdf
 
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
 
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
 
Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdf
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 

Cash to concept - Bringing a legacy system under test

  • 1. @wouterla #lascot @karelboekhout Ca$h to conc€pt Bringing a legacy system under test
  • 2. @wouterla #lascot @karelboekhout Who are we? Karel Boekhout @karelboekhout Wouter Lagerweij @wouterla 2
  • 3. @wouterla #lascot @karelboekhout You know this one... 3 Source: Jeff Patton
  • 4. @wouterla #lascot @karelboekhout Let’s create this one! 4 Why? ● Usually not greenfields, but a big ball of legacy application ● No tests available ● Practical: you can start today
  • 5. @wouterla #lascot @karelboekhout 5 What does this %^)#$ application do? Let’s start with a Mental Breakdown What do we have? What does it do? Will it keep working? Does it do what you think it does? Do you care?
  • 6. @wouterla #lascot @karelboekhout Our example 6 Let’s start with a Functional Breakdown
  • 7. @wouterla #lascot @karelboekhout Spotify: Home 7 Home screen <suggestions> More of what you like Made for …. Keep the vibe going Recently played Mood Your heavy rotation
  • 8. @wouterla #lascot @karelboekhout Spotify: Search 8 Search Browse all Your top genres Search bar
  • 9. @wouterla #lascot @karelboekhout Spotify: Library 9 Your Library Songs Stations Playlists Made for You Albums Artists Podcasts Settings Recently Played Profile
  • 10. @wouterla #lascot @karelboekhout Spotify: Play 10 Player Manage devices Artist Player controls TitleAdd to my library Share to socials Cover Playlist Extra actions Back to Home Behind the lyrics
  • 11. @wouterla #lascot @karelboekhout Start a ‘Heatmap’ The Functional Breakdown Colour coded for the testing we have available The Heatmap ● Our overview for the level of control over our system: ○ What are we testing? ○ How are we testing it? 11
  • 13. @wouterla #lascot @karelboekhout Heatmap 13 Home Search Library Play These are the created tests. We trust they are well executed. 😇
  • 14. @wouterla #lascot @karelboekhout Choose or lose: Priorities Recent: new features, new areas of code are more vulnerable Core: essential functions must continue to work Risk: some areas of an application pose more risk Configuration sensitive: code dependent on settings can be vulnerable Repaired: bug fixes can introduce new issues Chronic: some areas in an application may be perpetually sensitive to breaking RCRCRC by Karen Johnson, via Matt Heusser 14 We pick Search
  • 15. @wouterla #lascot @karelboekhout Back to the Heatmap 15 Search Home Library Playlist Manage Playlist Play
  • 16. @wouterla #lascot @karelboekhout What is a Story Map? 16 ● Follow the flow through the application (user activities) ● Specific User Stories in that flow (detailed actions) ● Slices (things that go well together) ● Priority (what do we do/test first?) ● Difference with building new functionality: ○ Priorities ○ Testing effort instead of implementation effort ○ Dependencies ○ Granularity ○ We know more! User Story Mapping by Jeff Patton
  • 17. @wouterla #lascot @karelboekhout Our Story Map of Manage Playlist 17 Create and play Find and edit Sort Share Later
  • 18. @wouterla #lascot @karelboekhout Back to the Heatmap 18 Search Home Create and play Library Playlist Manage Playlist Play Find and edit Sort Share
  • 19. @wouterla #lascot @karelboekhout How to make a Story Map ● We start with flow horizontally (orange) ● Each step in the flow can have multiple stories (yellow) ● Use the vertical to create different levels of priority (slices) (pink) ● Make each horizontal ‘slice’ something you can give a name to ● We do this together (three amigos) 19
  • 20. @wouterla #lascot @karelboekhout Story Mapping of Spotify Search 20 Search Browse all Your top genres Search bar Now you try! Recent Core Risk Configuration sensitive Repaired Chronic
  • 21. @wouterla #lascot @karelboekhout Story Mapping: let’s discuss! ● Do you have slices? ● Can you name each slice? ● Why in this order? 21
  • 22. @wouterla #lascot @karelboekhout Using the outcomes of Story Map ● Each slice can be named as a separate box in the functional overview ● Each separate box can be an end-to-end test ● Actually creating those tests turns the heatmap yellow ● Stories generated can be starting points for more detailed exploration 22 Validation Automated E2E Low Level Unknown Manual
  • 23. @wouterla #lascot @karelboekhout Back to the Heatmap 23 Validation Automated E2E Low Level Unknown Manual Search Home Create and play Library Playlist Manage Playlist Play Find and edit Sort Share
  • 24. @wouterla #lascot @karelboekhout Validation Each slice from the Story Map can be a test Search for a Song <assumes app opened, user logged in> Go to Search Search for (part of) a Song’s name Tap the Song to start it playing 24
  • 25. @wouterla #lascot @karelboekhout Validation Each slice from the Story Map can be a test Recent Searches Go to Search Search for any term Go back to Home Go back to Search See term appear on top of Recent Searches Delete term from Recent Searches Check by restarting Search Delete all items from Recent Searches Check by restarting Search 25
  • 26. @wouterla #lascot @karelboekhout Automate? Wait. We’re finding out what functionality there is to be tested Let humans test, don’t restrict them more than necessary Once you’ve discovered what is interesting about the functionality, maybe, automate Or, better, go into detail with an example map to get more high resolution tests 26
  • 27. @wouterla #lascot @karelboekhout Back to the Heatmap 27 Validation Automated E2E Low Level Unknown Manual Search Home Create and play Library Playlist Manage Playlist Play Find and edit Sort Share
  • 28. @wouterla #lascot @karelboekhout Validation ● High-level, low resolution, human end-to-end testing ● High-level, low resolution, automated end-to-end testing ● Low-level, high resolution, automated example based tests 28 Validation Automated E2E Low Level Unknown Manual
  • 29. @wouterla #lascot @karelboekhout Validation: Example Mapping For a story: - List the business rules - Provide examples that illustrate the rule - Capture open questions Centered around business rules Examples can be formalised (in Gherkin, or otherwise) in the form of a test: Input -> Action -> Outcome (Given/When/Then, Arrange/Act/Assert) 29 Example Mapping by Matt Wynne
  • 30. @wouterla #lascot @karelboekhout 30 Validation: Example Mapping
  • 32. @wouterla #lascot @karelboekhout Example Mapping 32 Now you try!
  • 33. @wouterla #lascot @karelboekhout Example Mapping Let’s discuss! 33
  • 34. @wouterla #lascot @karelboekhout Examples can be formalised into Scenarios Scenario: Playlist without name is auto-numbered Given existing Playlists | My Playlist #1 | | My Playlist #2 | When a new playlist without name is added Then that new playlist is given the name ‘My Playlist #3’ Scenario: Playlist without name gets next available slot Given existing Playlists | My Playlist #1 | | My Playlist #3 | When a new playlist without name is added Then that new playlist is given the name ‘My Playlist #2’ 34
  • 35. @wouterla #lascot @karelboekhout pseudocode Scenarios are implemented at same level the functionality lives Scenario: Playlist without name is auto-numbered Given existing Playlists | My Playlist #1 | | My Playlist #2 | When a new playlist without name is added Then that new playlist is given the name ‘My Playlist #3’ function testPlaylistNameAutoNumber() { playlists.addAll(‘My Playlist #1’, ‘My Playlists #2’) playlists.add(‘’) expect(playlists.getAll()).toContain(‘My Playlist #3’) } 35
  • 36. @wouterla #lascot @karelboekhout Back to the Heatmap 36 Validation Automated E2E Low Level Unknown Manual Search Home Create and play Library Playlist Manage Playlist Play Find and edit Sort Share
  • 37. @wouterla #lascot @karelboekhout Future? Test Result Failed Attention 😄 37 Validation Automated E2E Low Level Unknown Manual Search Home Create and play Library Playlist Manage Playlist Play Find and edit Sort Share
  • 38. @wouterla #lascot @karelboekhout Takeaways: Get back in control ○ What does it do? (functional breakdown) ○ Is it tested? (heatmap) ○ Go broad for overview (Story Map, manual/e2e tests) ○ Dive deep where necessary (Example Map, detailed tests) ○ Iterate! 38
  • 39. @wouterla #lascot @karelboekhout 39 Thank you! And... If you have a problem If no one else can help This is how you find us: wouter@lagerweij.com karel@hedgefields.com