SlideShare ist ein Scribd-Unternehmen logo
1 von 9
Downloaden Sie, um offline zu lesen
Szymon Homa 
Approach to automated 
tests with DDD and 
Hexagonal Architecture as a 
background. 
@s2lomon
Hexagonal Architecture 
Alistair Cockburn, Hexagonal Architecture
Hexagonal Architecture with a little bit of DDD 
Alistair Cockburn, Hexagonal Architecture 
Domain Model
Hexagonal Architecture along with 
Bounded Context 
Alistair Cockburn, Hexagonal Architecture
Hexagonal Architecture 
Alistair Cockburn, Hexagonal Architecture 
Domain Model 
Direction of 
Interactions
Tests of a Model 
Domain Model 
Alistair Cockburn, Hexagonal Architecture 
100% Unit Test (TDD) 
Classic TDD is the best option 
in a vast majority cases 
Test Double can be used only in a case 
of having a pure abstraction 
(like Strategy/Specyfication pattern) 
It’s good to have a Test Fixture
Tests of an Application Layer. 
Domain Model 
Alistair Cockburn, Hexagonal Architecture 
Test Double almost allways when we 
interact with another service, or separated 
functionality 
We should be using Model as it is 
(without Test Double) 
Model can (should) be produced by a same 
Test Fixture 
From time to time we can use Dummy 
instead of an actual implementation.
Tests in an Infrastructure Layer 
Domain Model 
Alistair Cockburn, Hexagonal Architecture 
Integration tests should prevail 
Unit tests should be used only for classes 
that contains logic required to implement 
the actual adapter, like Assembler, 
Query Builder etc. 
Good place for acceptance tests 
"Test Double" can be occasionally used for 
external interfaces
Thanks

Weitere ähnliche Inhalte

Andere mochten auch

Andere mochten auch (11)

Fb3 m 2 a
Fb3   m 2 aFb3   m 2 a
Fb3 m 2 a
 
y
yy
y
 
Ink electronics ppt
Ink electronics pptInk electronics ppt
Ink electronics ppt
 
Motivasion skill
Motivasion skillMotivasion skill
Motivasion skill
 
педагогіка презентація курсу
педагогіка презентація курсупедагогіка презентація курсу
педагогіка презентація курсу
 
Internet marketing strategies
Internet marketing strategies Internet marketing strategies
Internet marketing strategies
 
As media overview
As media overviewAs media overview
As media overview
 
3rd general draft standard for bottled flavoured water ihwf chennai
3rd general draft standard for bottled flavoured water ihwf chennai3rd general draft standard for bottled flavoured water ihwf chennai
3rd general draft standard for bottled flavoured water ihwf chennai
 
Morgan, John_Professional Persona Project: Beatmaker, Songwriter, Producer
Morgan, John_Professional Persona Project: Beatmaker, Songwriter, ProducerMorgan, John_Professional Persona Project: Beatmaker, Songwriter, Producer
Morgan, John_Professional Persona Project: Beatmaker, Songwriter, Producer
 
Available2
Available2Available2
Available2
 
Preservacion del patrimonio historico del estado tachira
Preservacion del patrimonio historico del estado tachiraPreservacion del patrimonio historico del estado tachira
Preservacion del patrimonio historico del estado tachira
 

Kürzlich hochgeladen

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Kürzlich hochgeladen (20)

Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 

Approach to automated tests with ddd and hexagonal architecture as a background

  • 1. Szymon Homa Approach to automated tests with DDD and Hexagonal Architecture as a background. @s2lomon
  • 2. Hexagonal Architecture Alistair Cockburn, Hexagonal Architecture
  • 3. Hexagonal Architecture with a little bit of DDD Alistair Cockburn, Hexagonal Architecture Domain Model
  • 4. Hexagonal Architecture along with Bounded Context Alistair Cockburn, Hexagonal Architecture
  • 5. Hexagonal Architecture Alistair Cockburn, Hexagonal Architecture Domain Model Direction of Interactions
  • 6. Tests of a Model Domain Model Alistair Cockburn, Hexagonal Architecture 100% Unit Test (TDD) Classic TDD is the best option in a vast majority cases Test Double can be used only in a case of having a pure abstraction (like Strategy/Specyfication pattern) It’s good to have a Test Fixture
  • 7. Tests of an Application Layer. Domain Model Alistair Cockburn, Hexagonal Architecture Test Double almost allways when we interact with another service, or separated functionality We should be using Model as it is (without Test Double) Model can (should) be produced by a same Test Fixture From time to time we can use Dummy instead of an actual implementation.
  • 8. Tests in an Infrastructure Layer Domain Model Alistair Cockburn, Hexagonal Architecture Integration tests should prevail Unit tests should be used only for classes that contains logic required to implement the actual adapter, like Assembler, Query Builder etc. Good place for acceptance tests "Test Double" can be occasionally used for external interfaces