Comments
yourfanat wrote: I am using another tool for Oracle developers - dbForge Studio for Oracle. This IDE has lots of usefull features, among them: oracle designer, code competion and formatter, query builder, debugger, profiler, erxport/import, reports and many others. The latest version supports Oracle 12C. More information here.
Cloud Computing
Conference & Expo
November 2-4, 2009 NYC
Register Today and SAVE !..

2008 West
DIAMOND SPONSOR:
Data Direct
SOA, WOA and Cloud Computing: The New Frontier for Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
GOLD SPONSORS:
Appsense
User Environment Management – The Third Layer of the Desktop
Cordys
Cloud Computing for Business Agility
EMC
CMIS: A Multi-Vendor Proposal for a Service-Based Content Management Interoperability Standard
Freedom OSS
Practical SOA” Max Yankelevich
Intel
Architecting an Enterprise Service Router (ESR) – A Cost-Effective Way to Scale SOA Across the Enterprise
Sensedia
Return on Assests: Bringing Visibility to your SOA Strategy
Symantec
Managing Hybrid Endpoint Environments
VMWare
Game-Changing Technology for Enterprise Clouds and Applications
Click For 2008 West
Event Webcasts

2008 West
PLATINUM SPONSORS:
Appcelerator
Get ‘Rich’ Quick: Rapid Prototyping for RIA with ZERO Server Code
Keynote Systems
Designing for and Managing Performance in the New Frontier of Rich Internet Applications
GOLD SPONSORS:
ICEsoft
How Can AJAX Improve Homeland Security?
Isomorphic
Beyond Widgets: What a RIA Platform Should Offer
Oracle
REAs: Rich Enterprise Applications
Click For 2008 Event Webcasts
In many cases, the end of the year gives you time to step back and take stock of the last 12 months. This is when many of us take a hard look at what worked and what did not, complete performance reviews, and formulate plans for the coming year. For me, it is all of those things plus a time when I u...
SYS-CON.TV
ESB Testing Strategies with Mule
Will it break anything?

To be able to do anything useful, an ESB must be configured with all sorts of parameters, from endpoint connection URIs to message transformation scripts to content-based routing definitions. Moreover, ESBs like Mule can host custom components, which will process messages and perform user-specific actions on them.

Deploying a new version of an ESB configuration raises the question of whether it will break anything. How can we build confidence that everything will be just fine? If unit testing did it for standard software development, what can it do in the realm of the ESB? Since ESBs are becoming increasingly familiar in corporate IT, getting concrete answers is of interest to more and more people.

This article details the testing strategies I employ for Mule ESB-driven projects, which I think contain elements that could be generalized to other platforms. I am certain that readers will have strategies of their own and I welcome their comments. I am also convinced that ESB vendors have their own approaches, sometimes generic, often proprietary, and that they are worth following if you use their tool. This article does not cover the subject of SOA testing strategies, which is already thoroughly discussed in the industry.

Level One: Unit Testing - Components and Transformers
Whether they are compiled or scripted, components can easily be unit tested. Provided they have been correctly initialized, unit testing them amounts to receiving an expected response for a known input. Correctly initializing a component consists of calling its lifecycle methods, if any, for compiled ones or establishing the correct environment context for scripted ones. Some components are more complex in the sense that they can be aware of the event context in which they process a message payload or need to connect to other end points. Mule's ESB functional test library (mule-tests-functional-xyz.jar) offers a variety of helpers, mostly in the form of subclasses of JUnit TestCase to establish test event context or temporary end points, which let us test this kind of component thoroughly. For example, here is an example for testing an event-aware component:

import org.mule.impl.RequestContext;
import org.mule.tck.AbstractMuleTestCase;
public class EventAwareComponentTestCase extends AbstractMuleTestCase {
protected static final String TEST_PAYLOAD = "test.foo.payload";
public EventAwareComponentTestCase() {
super();
}
@Override
protected void doSetUp() throws Exception {
RequestContext.setEvent(getTestEvent(TEST_PAYLOAD));
}
@Override
protected void doTearDown() throws Exception {
RequestContext.setEvent(null);
}
}

Transformers are very similar to components as far as testing is concerned. For the ones that are unaware of their ESB context, unit testing is straightforward; for others, Mule testing tools will come in handy. Note that at this level, it is the transformer that is tested and not how well its configuration makes the expected transformation on a particular message (this is discussed later).

About David Dossot
David Dossot has worked as a software engineer and architect for more than 14 years. He is a co-author of Mule in Action and is the project despot of the JCR Transport and a member of the Mule Community Committee. He is the project lead of NxBRE, an open source business rules engine for the .NET platform (selected for O'Reilly's Windows Developer Power Tools). He is also a judge for the Jolt Product Excellence Awards and has written several articles for SD Magazine. He holds a Production Systems Engineering Diploma from ESSTIN.

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1

SOA World Latest Stories
The dynamic nature of the cloud means that change is a constant when it comes to modern cloud-based infrastructure. Delivering modern applications to end users, therefore, is a constantly shifting challenge. Delivery automation helps IT Ops teams ensure that apps are providing an optim...
Kubernetes is an open source system for automating deployment, scaling, and management of containerized applications. Kubernetes was originally built by Google, leveraging years of experience with managing container workloads, and is now a Cloud Native Compute Foundation (CNCF) project...
Modern software design has fundamentally changed how we manage applications, causing many to turn to containers as the new virtual machine for resource management. As container adoption grows beyond stateless applications to stateful workloads, the need for persistent storage is founda...
The past few years have brought a sea change in the way applications are architected, developed, and consumed—increasing both the complexity of testing and the business impact of software failures. How can software testing professionals keep pace with modern application delivery, giv...
SYS-CON Events announced today that Synametrics Technologies will exhibit at SYS-CON's 22nd International Cloud Expo®, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. Synametrics Technologies is a privately held company based in Plainsboro, New Jersey th...
You know you need the cloud, but you’re hesitant to simply dump everything at Amazon since you know that not all workloads are suitable for cloud. You know that you want the kind of ease of use and scalability that you get with public cloud, but your applications are architected in a w...
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


SYS-CON Featured Whitepapers
ADS BY GOOGLE