Upload
qaoth
View
403
Download
0
Embed Size (px)
Citation preview
Test Automation in the “Microservices” Oriented
EnterpriseShawn Wallace
Architect, Centric Consulting
I’m Shawn
I’m ShawnFavorite Movie
I’m ShawnMy dog
Favorite Movie
I’m ShawnMy dog
My Son
Favorite Movie
I’m ShawnMy dog
My Son
My Daughter
Favorite Movie
I’m ShawnMy dog
My Son
My Daughter
My Family
Favorite Movie
I’m ShawnMy dog
My Son
My Daughter
My Family
I live here
Favorite Movie
I’m ShawnMy dog
My Son
My Daughter
My Family
I live here
Favorite Movie
I a Marine Vet
I’m ShawnMy dog
My Son
My Daughter
My Family
I live here
I went to Ohio State
Favorite Movie
I a Marine Vet
I’m ShawnMy dog
My Son
My Daughter
My Family
I live here
I went to Ohio State
Where I work
Favorite Movie
I a Marine Vet
What I got for Valentine’s Day
I’m a Developer…
Microservices
How did we get here?
Monolithic Applications
Monolithic Applications
Orders
Monolithic Applications
Invoicing Inventory
Logging
Profiles
Warehouse
Orders
Monolithic Applications
Invoicing Inventory
Logging
Profiles
Warehouse
Orders
Monolithic Applications
Invoicing Inventory
Logging
Profiles
Warehouse
Orders
Time To Build
Monolithic Applications
Invoicing Inventory
Logging
Profiles
Warehouse
Orders
Time To Build
Size of Codebase
Monolithic Applications
Invoicing Inventory
Logging
Profiles
Warehouse
Orders
Time To Build
Time To Test
Size of Codebase
Monolithic Applications
Invoicing Inventory
Logging
Profiles
Warehouse
Orders
Time To Build
Time To Test
Size of Codebase
We are getting better at writing code than getting it into production.
Service Oriented Architecture (SOA)
Orders Invoicing Inventory
Logging Profiles Warehouse
Orders Invoicing Inventory
Logging Profiles Warehouse
Service Oriented Architecture (SOA)
Orders Invoicing Inventory
Logging Profiles Warehouse
Service Oriented Architecture (SOA)
Orders Invoicing Inventory
Logging Profiles Warehouse
Tightly Coupled
Service Oriented Architecture (SOA)
Loosely Coupled
Orders Invoicing Inventory
Logging Profiles Reporting
Event Bus
Service Based Architecture• No point-to-point integrations • Loosely coupled, highly scalable systems • Loosely coupled, TEAMS • Easier to test • Easier to change • Topology agnostic
Easy to Integrate New Systems
Orders Invoicing Inventory
Logging Profiles Reporting
Event Bus
Easy to Integrate New Systems
Orders Invoicing Inventory
Logging Profiles Reporting
Event Bus
New System
Scales
Orders Invoicing Inventory
Logging Profiles Reporting
Event Bus
InventoryInventory
Inventory
Scales
Orders Invoicing Inventory
Logging Profiles Reporting
Event Bus
Other benefits• Ease of 3rd party integration • Existing systems can be ‘wrapped’ • Can be deliberate about scaling • Fault tolerant • Event messages can be logged and ‘replayed’ • Can test subsystems in isolation
DevOps is a Real Thing
EngineeringQuality
Assurance
IT Operations
EngineeringQuality
Assurance
IT Operations
Tension
IT Operations
Quality
AssuranceEngin
eerin
g
IT Operations
Quality
AssuranceEngin
eerin
g
DevOps
…that you might need to develop
…that you might need to develop• Technical in nature • Http Verbs (POST, GET, PUT, PATCH, DELETE, OPTIONS) • Http Headers • ReST • API • More about networking than
you would like • Oh, and you still need to know
the business
Once you have developed these skills, a whole new world of testing capability becomes available to you.
Easy to Test
Easy to Test
80-90%
5-15%
1-5%
• Deliberately test your system at the physical boundaries
• Know what your system does and how it works
• Collaborate! Collaborate! collaborate!
• Deliberately test your system at the physical boundaries
• Know what your system does and how it works
• Collaborate! Collaborate! collaborate!
• Deliberately test your system at the physical boundaries
• Know what your system does and how it works
• Collaborate! Collaborate! collaborate!
Terminology
Terminology• Messaging • Contracts • Messaging Infrastructure • Asynchronous • Loosely Coupled • “Edge” Testing • Mocks/Fakes • Dynamic Scaling • Data Consistency, Master Data Management
• Messaging • Contracts • Messaging Infrastructure • Asynchronous • Loosely Coupled • “Edge” Testing • Mocks/Fakes • Dynamic Scaling • Data Consistency, Master Data Management
Orders Invoicing Inventory
Logging Profiles Reporting
Event Bus
Terminology
• Messaging • Contracts • Messaging Infrastructure • Asynchronous • Loosely Coupled • “Edge” Testing • Mocks/Fakes • Dynamic Scaling • Data Consistency, Master Data Management
Orders Invoicing Inventory
Logging Profiles Reporting
Event Bus
Terminology
• Messaging • Contracts • Messaging Infrastructure • Asynchronous • Loosely Coupled • “Edge” Testing • Mocks/Fakes • Dynamic Scaling • Data Consistency, Master Data Management
Orders Invoicing Inventory
Logging Profiles Reporting
Event Bus
Terminology
• Messaging • Contracts • Messaging Infrastructure • Asynchronous • Loosely Coupled • “Edge” Testing • Mocks/Fakes • Dynamic Scaling • Data Consistency, Master Data Management
Orders Invoicing Inventory
Logging Profiles Reporting
Event Bus
Terminology
Terminology• Messaging • Contracts • Messaging Infrastructure • Asynchronous • Loosely Coupled • “Edge” Testing • Mocks/Fakes • Dynamic Scaling • Data Consistency, Master Data Management
Orders Invoicing Inventory
Logging Profiles Reporting
Event Bus
Terminology• Messaging • Contracts • Messaging Infrastructure • Asynchronous • Loosely Coupled • “Edge” Testing • Mocks/Fakes • Dynamic Scaling • Data Consistency, Master Data Management
Orders Invoicing Inventory
Logging Profiles Reporting
Event Bus
Terminology• Messaging • Contracts • Messaging Infrastructure • Asynchronous • Loosely Coupled • “Edge” Testing • Mocks/Fakes • Dynamic Scaling • Data Consistency, Master Data Management
Orders
Fake Consumer
Terminology• Messaging • Contracts • Messaging Infrastructure • Asynchronous • Loosely Coupled • “Edge” Testing • Mocks/Fakes • Dynamic Scaling • Data Consistency, Master Data Management
Orders Invoicing Inventory
Logging Profiles Reporting
Event Bus
Terminology• Messaging • Contracts • Messaging Infrastructure • Asynchronous • Loosely Coupled • “Edge” Testing • Mocks/Fakes • Dynamic Scaling • Data Consistency, Master Data Management
Orders Invoicing Inventory
Logging Profiles Reporting
Event Bus
Inventory
Inventory
Inventory
Terminology• Messaging • Contracts • Messaging Infrastructure • Asynchronous • Loosely Coupled • “Edge” Testing • Mocks/Fakes • Dynamic Scaling • Data Consistency, Master Data Management
Testing Approaches
Use your web browser
• Can only execute un-authenticated GET requests • Can only access web clients • Hard to set headers
Use a web “sniffer”
Use a web “sniffer”
• Fiddler - more granularity, more technicalhttp://www.telerik.com/fiddler
Use a web “sniffer”
• Fiddler - more granularity, more technicalhttp://www.telerik.com/fiddler
• Postman - more friendly user interfacehttps://www.getpostman.com
Use a functional testing tool
Shawn [email protected]
@ShawnWallace
http://blog.shawnewallace.com
http://www.about.me/shawnwallace
This Presentation