SlideShare uma empresa Scribd logo
1 de 21
Baixar para ler offline
When I code
I write tests
X-unit frameworks
http://mockito.org
what are mocks?
substitues of real
  objects...




                         ...for testing
                            purposes
Enough jokes, meet your bartender



        Szczepan Faber
     Coach at Sabre Holdings
        Krakow, Poland
Java: Tools &
techniques for
    TDD
Who does it?
Learning TDD
the student must first resign himself
  and his ego to a seemingly random
  series of repetitious exercises


     Yukiyoshi Takamura
Shu Ha Ri
Improving TDD
Stop writing tests
Instead, describe the behavior
Or simply, write examples

http://behaviour-driven.org
Enough slides.
Start coding now...
Your takeaways I
Shu-Ha-Ri
Don’t write tests, write examples
Your takeaways II
Mockito
Custom assertion with FEST
The ultimate test template
The ultimate test template
@Test
public void should...() throws Exception {
 //given
 ...

    //when
    ...

    //then
    ...                          Sapir-Whorf
}
                                    Theory
Thanks for surviving the session!

• Questions?
• Feedback?
• szczepiq (at) gmail.com




                            Yummy. No hangover.
                            (Eastern Europeans only)

Mais conteúdo relacionado

Mais de Agileee

Piotr Burdylo: Managing developers is complex
Piotr Burdylo: Managing developers is complexPiotr Burdylo: Managing developers is complex
Piotr Burdylo: Managing developers is complexAgileee
 
Nick Oostvogels: 5 Arguments Against Kanban
Nick Oostvogels: 5 Arguments Against KanbanNick Oostvogels: 5 Arguments Against Kanban
Nick Oostvogels: 5 Arguments Against KanbanAgileee
 
Anthony Marchenko: Опыт внедрения Kanban
Anthony Marchenko: Опыт внедрения KanbanAnthony Marchenko: Опыт внедрения Kanban
Anthony Marchenko: Опыт внедрения KanbanAgileee
 
Nataliya Trenina: Office magic
Nataliya Trenina: Office magicNataliya Trenina: Office magic
Nataliya Trenina: Office magicAgileee
 
Henrik Kniberg: Agile at home
Henrik Kniberg: Agile at homeHenrik Kniberg: Agile at home
Henrik Kniberg: Agile at homeAgileee
 
Henrik Kniberg: Lean from the Trenches keynote @ AgileEE
Henrik Kniberg: Lean from the Trenches keynote @ AgileEEHenrik Kniberg: Lean from the Trenches keynote @ AgileEE
Henrik Kniberg: Lean from the Trenches keynote @ AgileEEAgileee
 
Nathaniel Cadwell: The Art of Facilitation
Nathaniel Cadwell: The Art of Facilitation Nathaniel Cadwell: The Art of Facilitation
Nathaniel Cadwell: The Art of Facilitation Agileee
 
Scrum and kanban
Scrum and kanbanScrum and kanban
Scrum and kanbanAgileee
 
How To Change The World
How To Change The WorldHow To Change The World
How To Change The WorldAgileee
 
The Extreme Decade
The Extreme DecadeThe Extreme Decade
The Extreme DecadeAgileee
 
Agile Testing. Risks, Uncertainty and Why It All Works
Agile Testing. Risks, Uncertainty and Why It All WorksAgile Testing. Risks, Uncertainty and Why It All Works
Agile Testing. Risks, Uncertainty and Why It All WorksAgileee
 
Movivation 3.0
Movivation 3.0Movivation 3.0
Movivation 3.0Agileee
 
Effective Software Development in the 21st Century
Effective Software Development in the 21st CenturyEffective Software Development in the 21st Century
Effective Software Development in the 21st CenturyAgileee
 
Myths, Legends and Monsters of Enterprise Agility
Myths, Legends and Monsters of Enterprise AgilityMyths, Legends and Monsters of Enterprise Agility
Myths, Legends and Monsters of Enterprise AgilityAgileee
 
Lightening Talk: Software craftsmanship
Lightening Talk: Software craftsmanshipLightening Talk: Software craftsmanship
Lightening Talk: Software craftsmanshipAgileee
 
Lightening Talk: Lean start up
Lightening Talk: Lean start upLightening Talk: Lean start up
Lightening Talk: Lean start upAgileee
 
Lightening Talk: lama sutra of retrospective
Lightening Talk: lama sutra of retrospectiveLightening Talk: lama sutra of retrospective
Lightening Talk: lama sutra of retrospectiveAgileee
 
Lightening Talk: Just do it eng
Lightening Talk: Just do it engLightening Talk: Just do it eng
Lightening Talk: Just do it engAgileee
 
Lightening Talk: Why do they leave
Lightening Talk: Why do they leaveLightening Talk: Why do they leave
Lightening Talk: Why do they leaveAgileee
 
Lightening Talk: definition of ready
Lightening Talk: definition of readyLightening Talk: definition of ready
Lightening Talk: definition of readyAgileee
 

Mais de Agileee (20)

Piotr Burdylo: Managing developers is complex
Piotr Burdylo: Managing developers is complexPiotr Burdylo: Managing developers is complex
Piotr Burdylo: Managing developers is complex
 
Nick Oostvogels: 5 Arguments Against Kanban
Nick Oostvogels: 5 Arguments Against KanbanNick Oostvogels: 5 Arguments Against Kanban
Nick Oostvogels: 5 Arguments Against Kanban
 
Anthony Marchenko: Опыт внедрения Kanban
Anthony Marchenko: Опыт внедрения KanbanAnthony Marchenko: Опыт внедрения Kanban
Anthony Marchenko: Опыт внедрения Kanban
 
Nataliya Trenina: Office magic
Nataliya Trenina: Office magicNataliya Trenina: Office magic
Nataliya Trenina: Office magic
 
Henrik Kniberg: Agile at home
Henrik Kniberg: Agile at homeHenrik Kniberg: Agile at home
Henrik Kniberg: Agile at home
 
Henrik Kniberg: Lean from the Trenches keynote @ AgileEE
Henrik Kniberg: Lean from the Trenches keynote @ AgileEEHenrik Kniberg: Lean from the Trenches keynote @ AgileEE
Henrik Kniberg: Lean from the Trenches keynote @ AgileEE
 
Nathaniel Cadwell: The Art of Facilitation
Nathaniel Cadwell: The Art of Facilitation Nathaniel Cadwell: The Art of Facilitation
Nathaniel Cadwell: The Art of Facilitation
 
Scrum and kanban
Scrum and kanbanScrum and kanban
Scrum and kanban
 
How To Change The World
How To Change The WorldHow To Change The World
How To Change The World
 
The Extreme Decade
The Extreme DecadeThe Extreme Decade
The Extreme Decade
 
Agile Testing. Risks, Uncertainty and Why It All Works
Agile Testing. Risks, Uncertainty and Why It All WorksAgile Testing. Risks, Uncertainty and Why It All Works
Agile Testing. Risks, Uncertainty and Why It All Works
 
Movivation 3.0
Movivation 3.0Movivation 3.0
Movivation 3.0
 
Effective Software Development in the 21st Century
Effective Software Development in the 21st CenturyEffective Software Development in the 21st Century
Effective Software Development in the 21st Century
 
Myths, Legends and Monsters of Enterprise Agility
Myths, Legends and Monsters of Enterprise AgilityMyths, Legends and Monsters of Enterprise Agility
Myths, Legends and Monsters of Enterprise Agility
 
Lightening Talk: Software craftsmanship
Lightening Talk: Software craftsmanshipLightening Talk: Software craftsmanship
Lightening Talk: Software craftsmanship
 
Lightening Talk: Lean start up
Lightening Talk: Lean start upLightening Talk: Lean start up
Lightening Talk: Lean start up
 
Lightening Talk: lama sutra of retrospective
Lightening Talk: lama sutra of retrospectiveLightening Talk: lama sutra of retrospective
Lightening Talk: lama sutra of retrospective
 
Lightening Talk: Just do it eng
Lightening Talk: Just do it engLightening Talk: Just do it eng
Lightening Talk: Just do it eng
 
Lightening Talk: Why do they leave
Lightening Talk: Why do they leaveLightening Talk: Why do they leave
Lightening Talk: Why do they leave
 
Lightening Talk: definition of ready
Lightening Talk: definition of readyLightening Talk: definition of ready
Lightening Talk: definition of ready
 

Último

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 

Último (20)

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 

Java: tools & techniques for TDD