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
Most of the time there is a lot of work involved to move to the cloud, and most of that isn't really related to AWS or Azure or Google Cloud. Before we talk about public cloud vendors and DevOps tools, there are usually several technical and non-technical challenges that are connected ...
21st International Cloud Expo, taking place October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA, will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced b...
With the rise of DevOps, containers are at the brink of becoming a pervasive technology in Enterprise IT to accelerate application delivery for the business. When it comes to adopting containers in the enterprise, security is the highest adoption barrier. Is your organization ready to ...
"NetApp's vision is how we help organizations manage data - delivering the right data in the right place, in the right time, to the people who need it, and doing it agnostic to what the platform is," explained Josh Atwell, Developer Advocate for NetApp, in this SYS-CON.tv interview at ...
The “Digital Era” is forcing us to engage with new methods to build, operate and maintain applications. This transformation also implies an evolution to more and more intelligent applications to better engage with the customers, while creating significant market differentiators. In bo...
Many organizations adopt DevOps to reduce cycle times and deliver software faster; some take on DevOps to drive higher quality and better end-user experience; others look to DevOps for a clearer line-of-sight to customers to drive better business impacts. In truth, these three foundati...
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