What is MockingBird?
MockingBird is a tool-set for mocking web services. The core engine is essentially a configurable message interceptor that can act as a stand in for any web service.
The two primary usage scenarios for MockingBird are
- Contract First development
- Isolation of build & dev servers from external dependencies
Current Release
We have now started work on V2 and the first item on the list is the WCF port. If you are interested, check the latest code drop in the Source tab. The roadmap for the tool can now be found in
this blog post
Why should I care? - The Elevator Pitch for MockingBird
Consider the scenario where you are given the WSDL for a third-party web-service but no functioning system is available yet (it may be a brand new service or perhaps dev/site licenses are being negotiated). You need to get on with development right now. What do you code against? If you are into TDD & MockObjects you may look to mock up an interface corresponding to the WSDL and develop against that. But what if you ‘don’t do’ TDD & Mocks? Or it may be that you are maintaining/enhancing an existing system that wasn’t coded against interfaces so mocking may not be possible. Or what if you are a BizTalk developer? You cannot mock/inject dependencies into your orchestrations and other components (well, except for pipeline components, but thats another story)!!
Next, imagine that you are setting up a build server and multiple environments (DEV, TEST, UAT etc). But the vendor says you can only have one license for their software. Now how do you run DEV, TEST, UAT in parallel with different data sets? Or you may have more than one license, but what if that service has maintenance schedules that clash with your build? Your build server is then completely exposed to something you don’t control.
Being able to set up complete mock services is invaluable in these scenarios. Unfortunately there aren't many tools available to help with this so we have to resort to manually coding mock services. MockingBird aims to make it easy and quick to build configurable mock services. Now there is no need to mess with WSDL.exe and svcutil to generate server side stubs and manually add logic. Simply drop in an XML file representing your service behavior, put in a couple of configuration entries and you're ready to go with a new service endpoint.
Please read through the documentation available on this workspace (and included with each release) to understand how the MockingBird toolset works in greater detail.
Credits
MockingBird started life as
MockWeb an internal HTTP based tool that my former colleagues
Senthil Sai (who initiated it) and
Will Struthers and I developed. All credit must go to them for the inspiration behind this.
What does it look like and what's inside the box ?
At a very high level the system looks like the illustration below

The only requirement for the system to work is a “model” representing the endpoint. The model is currently in XML but there is potential for other representations in future such as XAML (which will fit well with the declarative services approach)
There are 3 main components of MockingBird at this time (and many more to come)
- A Service Simulator web app (comprised of an ASP.NET HttpHandler and a Simulation Framework) which is configured to return pre-set responses
- A Service Studio application that has two main modules
- A module to parse a given WSDL and generate sample requests and responses and help in setting up a mock service quickly.
- A module to invoke the test services or remote services and check the responses.
- A WSDL Parsing and XML Instance Generation library that is used in the Service Studio but can also be used independently.
Do note that although this is a regular ASP.NET HttpHandler there is no reason it cannot mock a WCF service call to a HTTP end point. Just register the end-point with the
.svc extension in configuration.
Please refer to the comprehensive documentation (included with the download package) to understand how to install it, how it works and how to extend it.
Workspace Contents
- Quick Setup Guide - the 10 min overview to setting it up
- Detailed Scenarios - description of the Contract First approaches and the Environment Isolation
- Alternative approaches - what other approaches can be used for mocking services?
Blog Articles
My blog articles charting the progress of the development of this tool
- Introducing MockingBird (announcing this tool)
- Waltzing with WSDL (progress on the Studio GUI
- MockingBird Beta
- MockingBird Beta-2
- MockingBird v1 RTM
- MockingBird - The Roadmap
Forthcoming Release(s)
v2 is now in the planning stage. There are a number of work items published looking toward V2 so please weigh in on them and vote for the ones that will be most useful to you and also please feel free to send me suggestions for other features as well as bug reports.
Platform and Pre-requisites
This is written against .NET 3.5 and uses some C# 3.0 features as well as the
MoQ mock-object framework. The IoC mechanism is
Unity . The test framework is
MbUnit3.5. MbUnit 3.5 uses the
Gallio Test Automation Platform and these binaries are only required if you run the unit and functional tests (and the packages include the binaries used for development).
Roadmap
- MockingBird v2 will be thoroughly revised to be a WCF Message Interceptor so that non HTTP services can be mocked. Refer to the roadmap blog post linked above for more details on where the tool is going
Eventually I intend MockingBird to become a platform for
- A more general web service test tool
- A set of mock BizTalk WCF Send and Receive adapters
- Code generation of Biztalk and other artifacts (such as regular unit test fixtures, BizUnit tests and so on )
- etc
Of course, it all depends on time available outside regular work as this is a personal project and not officially endorsed in any way by my employer. If you would like to join up and contribute, that would be cool. Let me know. Please do send me feedback on your installation /setup experiences, thoughts on making it more extensible and so on, and most importantly of course, if its working for you or not. All feedback is appreciated.