|By David Linthicum||
|August 30, 2007 09:45 AM EDT||
So, does testing change with SOA? You bet it does. Unless you're willing to act now, you may find yourself behind the curve as SOA becomes systemic to all that is enterprise architecture, and we add more complexity to get to an agile and reusable state.
If you're willing to take the risk, the return on your SOA investment will come back three fold...that is, if it is a well-tested SOA. Untested SOA could cost you millions.
Truth be told, testing SOAs is a complex, disturbed computing problem. You have to learn how to isolate, check, and integrate, assuring that things work at the service, persistence, and process layers. The foundation of SOA testing is to select the right tool for the job, having a well-thought-out plan, and spare no expense in testing cycles or else risk that your SOA will lay an egg, and have no creditability.
Organizations are beginning to roll out their first instances of SOA, typically as smaller projects. While many are working fine, some are not living up to expectations due to quality issues that could have been prevented with adequate testing. You need to take these lessons, hard learned by others, and make sure that testing is on your priority list if you're diving into SOA.
How Do You Test Architecture?
The answer is, you don't. Instead you learn how to break the architecture down to its component parts, working from the most primitive to the most sophisticated, testing each component then the integration of the holistic architecture. In other words, you have to divide the architecture up into domains, such as services, security, governance, etc. and test each domain using whatever approach and tools are indicated. If this sounds complex, it is. Indeed, the notion of SOA is loosely coupled complex interdependence and so the approach for testing must follow the same patterns.
Before we can properly approach SOA testing, it's best to first understand the nature of the concept of SOA, and its component parts. There are many other references about the notion of SOA, so I won't dwell on it here. However, it's the foundation of the approaches and techniques you'll employ to test this architecture. SOA, simply put, is best defined thus:
SOA is a strategic framework of technology that allows all interested systems, inside and outside of an organization, to expose and access well-defined services, and information bound to those services, that may be further abstracted to orchestration layers and composite applications for solution development.
The primary benefits of a SOA, and so the objective of a test plan, include:
- Reuse of services, or the ability to leverage application behavior from application to application without a significant amount of re-coding or integration.
- Agility, or the ability to change business processes on top of existing services and information flows, quickly, and as needed to support a changing business.
- Monitoring, or the ability to monitor points of information and points of service, in real-time, to determine the well being of an enterprise or trading community. Moreover, the ability to change processes or adjust processes for the benefit of the organization in real-time.
- Extend Reach, or the ability to expose certain enterprise processes to other external entities for the purpose of inter-enterprise collaboration or shared processes.
Figure 1 represents a model of the SOA components, and how they're interrelated. What's key here is that those creating the test plan have both a macro understanding of how all the components work together as well as how each components exists unto itself and the best approach to testing those components.
You can group the testing domains for SOA into these major categories:
- Service-Level Testing
- Security-Level Testing
- Orchestration-Level Testing
- Governance-Level Testing
- Integration-Level Testing
In the world of SOA, services are the building blocks, and are found at the lowest level of the stack. Services become the base of a SOA, and while some are abstract existing "legacy services," others are new and built for specific purposes. Moving up the stack, we then find composite services, or services made up of other services, and all services abstract up into the business process or orchestration layer, which provides the agile nature of a SOA since you can create and change solutions using a configuration metaphor. It's also noteworthy that, while most of the services tested in SOAs will be Web Service-based, it's still acceptable to build SOAs using services that leverage other enabling technologies such as CORBA, J2EE, and even proprietary approaches.
When testing services, you need to keep the following in mind:
Services are not complete applications or systems and must be tested as such. They are a small part of an application. Nor are they subsystems; they are small parts of subsystems as well. So you need to test them with a high degree of independence, meaning that the services are both able to function properly by themselves, as well as part of a cohesive system. Indeed, services are more analogous to traditional application functions in terms of design, and how they are leveraged to form solutions, fine- or course-grained.
The best approach to testing services is to list the use cases for those services. At that point you can design testing approaches for that service including testing harnesses, or the use of SOA testing tools (discussed later). You also have to consider any services that the service may employ, and so be tested holistically as a single logical service. In some cases you may be testing a service that calls a service, that calls a service where some of the services are developed and managed in house, and some of them exist on remote systems that you don't control. All use cases and configurations must be considered.
Services should be tested with a high degree of autonomy. They should execute without dependencies, if at all possible, and be tested as independent units of code using a single design pattern that fits in other systems that use many design patterns. While all services can't be all things to all containers, it's important to spend time understanding their foreseeable use and make sure those are built into the test cases.
Services should have the appropriate granularity. Don't focus on too fine-grained or too loose-grained. Focus on that correct granularity for the purpose and use of the SOA. Here the issues related to testing are more along the lines of performance than anything else. Too finely grained services have a tendency to bog down due to the communications overhead required when dealing with so many services. Too loosely grained and they don't provide the proper autonomic values to support their reuse. You have to work with the service designer on this one.
- Real-World AJAX
- SOA 2 Point Oh No!
- Semantic Mapping, Ontologies, and XML Standards
- SOA - Loosely Coupled...What?
- Joining Enterprises With Web 2.0
- Ten Things to Think About When Building the Perfect SOA
- Why Services Are Like Craigslist
- Cloud Computing & SOA: Getting the Links Straight Between Them
- AJAX, RIA, SOA & Web 2.0 Mashups - Mash What?
- What Level Is Your SOA?