TriTAUG 3/13/2013
Testing Challenges in Service Oriented Architectures
What is SOA?Reasonable people can disagree...
What is SOA?
Is it this?
What is SOA?
Or this?
What is SOA?
Or this?
What is SOA?
Maybe this?
What is SOA?
What is SOA?
Services are built with:● Abstraction ● Autonomy● Decoupling● Statelessness
Behaviors are built via:● Contract● Discovery● Composition● Reuse
The guiding principles.
What is SOA?SOA is a set of guiding principles that can help you decompose a complex, monolithic application into an application composed of discrete, distributed services.
SOA allows you to more easily scale your application to meet demand.
SOA allows you to more easily scale your engineering team to meet demand.
Why is testing SOA hard?Let's take a little stroll...
The "Good" Old Days
n-Tier the Dragon
Sanity Ousting Architecture?
Why is Testing SOA Hard?● So many services
○ ... most are headless○ ... most have independent lifecycles○ ... with so many interactions between them○ ... with so many failure domains
● So many teams○ ...some working on shared libraries○ ...some working on discrete services○ ...some composing new application behaviors
● So many moving parts○ ...more changes than you can possibly follow○ ...more builds than you can possibly verify
Layering Tests
● Unit Tests○ Tests the smallest behaviors exposed by source○ No external dependencies
● Integration Tests○ Tests the smallest behaviors exposed by a service○ Minimal external dependencies
● Acceptance Tests○ Tests the entire, fully composed application○ The kitchen sink -- every service, every resource
Layering Tests
● Unit Tests○ White Box○ Immediate feedback
● Integration Tests○ Grey Box○ Validating behavior against service specification
● Acceptance Tests○ Black Box○ Validating behavior of the complete application
Build a Funnel
...that pass unit tests
!
? ? ? ? ?
...that pass integration tests
...that pass acceptance tests
Let Computers Do The Heavy Lifting
M'lord...Your pre-verified build is ready.
Change Assumptions &Stop Swimming Upstream
TriTAUG 3/13/2013
Testing Challenges in Service Oriented Architectures