Top Banner
Test Automation in the “Microservices” Oriented Enterprise Shawn Wallace Architect, Centric Consulting
72

Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Apr 15, 2017

Download

Technology

qaoth
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Test Automation in the “Microservices” Oriented

EnterpriseShawn Wallace

Architect, Centric Consulting

Page 2: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

I’m Shawn

Page 3: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

I’m ShawnFavorite Movie

Page 4: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

I’m ShawnMy dog

Favorite Movie

Page 5: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

I’m ShawnMy dog

My Son

Favorite Movie

Page 6: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

I’m ShawnMy dog

My Son

My Daughter

Favorite Movie

Page 7: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

I’m ShawnMy dog

My Son

My Daughter

My Family

Favorite Movie

Page 8: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

I’m ShawnMy dog

My Son

My Daughter

My Family

I live here

Favorite Movie

Page 9: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

I’m ShawnMy dog

My Son

My Daughter

My Family

I live here

Favorite Movie

I a Marine Vet

Page 10: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

I’m ShawnMy dog

My Son

My Daughter

My Family

I live here

I went to Ohio State

Favorite Movie

I a Marine Vet

Page 11: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

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

Page 12: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

What I got for Valentine’s Day

Page 13: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

I’m a Developer…

Page 14: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace
Page 15: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Microservices

Page 16: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

How did we get here?

Page 17: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Monolithic Applications

Page 18: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Monolithic Applications

Orders

Page 19: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Monolithic Applications

Invoicing Inventory

Logging

Profiles

Warehouse

Orders

Page 20: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Monolithic Applications

Invoicing Inventory

Logging

Profiles

Warehouse

Orders

Page 21: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Monolithic Applications

Invoicing Inventory

Logging

Profiles

Warehouse

Orders

Time To Build

Page 22: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Monolithic Applications

Invoicing Inventory

Logging

Profiles

Warehouse

Orders

Time To Build

Size of Codebase

Page 23: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Monolithic Applications

Invoicing Inventory

Logging

Profiles

Warehouse

Orders

Time To Build

Time To Test

Size of Codebase

Page 24: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

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.

Page 25: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Service Oriented Architecture (SOA)

Orders Invoicing Inventory

Logging Profiles Warehouse

Page 26: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Orders Invoicing Inventory

Logging Profiles Warehouse

Service Oriented Architecture (SOA)

Page 27: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Orders Invoicing Inventory

Logging Profiles Warehouse

Service Oriented Architecture (SOA)

Page 28: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Orders Invoicing Inventory

Logging Profiles Warehouse

Tightly Coupled

Service Oriented Architecture (SOA)

Page 29: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Loosely Coupled

Orders Invoicing Inventory

Logging Profiles Reporting

Event Bus

Page 30: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Service Based Architecture• No point-to-point integrations • Loosely coupled, highly scalable systems • Loosely coupled, TEAMS • Easier to test • Easier to change • Topology agnostic

Page 31: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Easy to Integrate New Systems

Orders Invoicing Inventory

Logging Profiles Reporting

Event Bus

Page 32: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Easy to Integrate New Systems

Orders Invoicing Inventory

Logging Profiles Reporting

Event Bus

New System

Page 33: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Scales

Orders Invoicing Inventory

Logging Profiles Reporting

Event Bus

Page 34: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

InventoryInventory

Inventory

Scales

Orders Invoicing Inventory

Logging Profiles Reporting

Event Bus

Page 35: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

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

Page 36: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

DevOps is a Real Thing

Page 37: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

EngineeringQuality

Assurance

IT Operations

Page 38: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

EngineeringQuality

Assurance

IT Operations

Tension

Page 39: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

IT Operations

Quality

AssuranceEngin

eerin

g

Page 40: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

IT Operations

Quality

AssuranceEngin

eerin

g

DevOps

Page 41: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace
Page 42: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace
Page 43: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

…that you might need to develop

Page 44: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

…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

Page 45: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Once you have developed these skills, a whole new world of testing capability becomes available to you.

Page 46: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Easy to Test

Page 47: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Easy to Test

80-90%

5-15%

1-5%

Page 48: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

• Deliberately test your system at the physical boundaries

• Know what your system does and how it works

• Collaborate! Collaborate! collaborate!

Page 49: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

• Deliberately test your system at the physical boundaries

• Know what your system does and how it works

• Collaborate! Collaborate! collaborate!

Page 50: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

• Deliberately test your system at the physical boundaries

• Know what your system does and how it works

• Collaborate! Collaborate! collaborate!

Page 51: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Terminology

Page 52: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Terminology• Messaging • Contracts • Messaging Infrastructure • Asynchronous • Loosely Coupled • “Edge” Testing • Mocks/Fakes • Dynamic Scaling • Data Consistency, Master Data Management

Page 53: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

• 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

Page 54: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

• 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

Page 55: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

• 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

Page 56: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

• 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

Page 57: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

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

Page 58: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

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

Page 59: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Terminology• Messaging • Contracts • Messaging Infrastructure • Asynchronous • Loosely Coupled • “Edge” Testing • Mocks/Fakes • Dynamic Scaling • Data Consistency, Master Data Management

Orders

Fake Consumer

Page 60: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

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

Page 61: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

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

Page 62: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Terminology• Messaging • Contracts • Messaging Infrastructure • Asynchronous • Loosely Coupled • “Edge” Testing • Mocks/Fakes • Dynamic Scaling • Data Consistency, Master Data Management

Page 63: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Testing Approaches

Page 64: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Use your web browser

• Can only execute un-authenticated GET requests • Can only access web clients • Hard to set headers

Page 65: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace
Page 66: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Use a web “sniffer”

Page 67: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Use a web “sniffer”

• Fiddler - more granularity, more technicalhttp://www.telerik.com/fiddler

Page 68: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Use a web “sniffer”

• Fiddler - more granularity, more technicalhttp://www.telerik.com/fiddler

• Postman - more friendly user interfacehttps://www.getpostman.com

Page 69: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace
Page 70: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Use a functional testing tool

Page 71: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace
Page 72: Test Automation in the Microservices Oriented Enterprise by Shawn Wallace

Shawn [email protected]

@ShawnWallace

http://blog.shawnewallace.com

http://www.about.me/shawnwallace

This Presentation