Santosh Benjamin's Weblog

Adventures with AppFabric, BizTalk & Clouds

Introducing ‘Mockingbird’

with 7 comments


In my previous post, I briefly mentioned a tool that helped with the testing of web-service consumers. I’m happy to announce that this is now publicly available on CodePlex under the moniker “MockingBird’. Here are some details about the tool – where it came from, how it helps and where it is going. (Most of this info is on the CodePlex space, but i’ll reproduce it anyway).

The Scenarios for MockingBird

(1) Imagine 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? You maybe a ‘TDD & Mock Objects’ savvy dev which will help in many cases, 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 etc. 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)!!

(2) Next, imagine that you are setting up a build server and multiple environments (DEV, TEST, UAT etc). But now 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.

I’ve expanded on these scenarios in the tool documentation here, but essentially these are the two main scenarios that MockingBird targets.

The Origins of MockingBird

MockingBird started life as MockWeb an internal tool that my former colleagues (Senthil Sai and Will Struthers) and I developed. All credit must go to them as Senthil first came up with the concept and Will then contributed a lot to the code-base.

It started when we got rather fed up with having to set up multiple instances of a third party service and build data-sets just to help with testing our BizTalk orchestrations reliably. It grew rapidly and organically. While we felt that this concept and tool would be useful to the .NET dev community at large (not just BizTalk teams), the structure of the codebase (at the time) would not lend itself to easy extension and needed to be refactored before making it publicly available. Its taken a while , but now I’ve completely rewritten MockWeb and as I have mentioned in the roadmap, I intend this to go beyond HTTP Web Services and hence the new name.

Whats with the name – ‘MockingBird’ ? Sounds daft !!

Ok, so its not a tool that sits there and laughs at you when you try to test !! 🙂 . Thats not what the name is intended to convey. Wikipedia says that “They (mockingbirds) are best known for the habit of some species mimicking the songs of insect and amphibian sounds as well as other bird songs,[1] often loudly and in rapid succession” .

So the intent is to mimic web-services and I quite like the name ‘MockingBird anyway!!

The current implementation

There are two main elements to the current implementation

  • An ASP.NET HttpHandler which is configured to return pre-set responses
  • A WinForms GUI to setup the handler and associated configuration for a given WSDL.

The Roadmap

  • The first thing I intend to do is revise the implementation to be fully WCF based as i want to be able to intercept calls irrespective of transport protocol. This is 0ne of the reasons i rewrote the code-base and i hope there wont be too much churn as i extend it
  • The second thing is to make it a sort of platform to test webservices, generate BizUnit test steps, maybe C# test fixtures, possibly to code-gen Biztalk artifacts from given WSDLs and schemas.
  • Thirdly to take it into the realm of mock Biztalk adapters. WCF is key to that. I envisage this as being a pair of custom WCF send and receive adapters that can dynamically be configured.
  • Beyond that, lets see 🙂 .

So, check it out. There’s an alpha release currently available and your feedback will be appreciated. If you have any thoughts on how the mock Biztalk adapters could be done, I will be glad to hear and of course, if you want to join the project, you will be welcome.

Advertisements

Written by santoshbenjamin

January 14, 2009 at 2:39 PM

7 Responses

Subscribe to comments with RSS.

  1. […] Introducing ‘Mockingbird’ – Santosh Benjamin announces the alpha release of MockingBird, his web service mocking tool to assist in development when the real web service is not available or does not yet exist. […]

  2. […] Introducing ‘Mockingbird’ « Santosh Benjamin’s Weblog – a tool that helps with the testing of web-service consumers. Via The Morning Brew […]

  3. I like the name “Mockingbird” too. Not “To Kill a Mockingbird”, but I use SoapUI to create mock web services from WSDL. It works pretty well. The tool has quite a few capabilities and there is a free version. The only thing is that it is written in Java, so the UI is kind of flaky.

    Walter Michel

    January 16, 2009 at 1:53 AM

  4. That’s brilliant Benjy, it’s great to see that the spirit of Mock Web lives on to help other developers! I look forward to using Mockingbird sometime in the future when required.

    Daniel Robinson

    January 16, 2009 at 4:50 PM

  5. @Walter : Thanks. I used to use SoapUI a lot (the free version, what else !!). Couldnt get the Mocks feature there to work, but it was a nice tool. I would like to get MockingBird ‘Studio’ to have similar features and also to generate BizUnit tests, .NET test fixtures and so on and considering a WPF UI. I think that would really rock.

    @Daniel: G’day mate!!MockWeb does indeed live on. We gotta get back in touch. Hope you find it useful. Should have more functionality in shortly.

    santoshbenjamin

    January 16, 2009 at 10:33 PM

  6. Cool! I’ll test this soon and try and give you some feedback.

    Richard Hallgren

    February 12, 2009 at 7:54 AM

  7. Benjy,
    Started to use MockingBird today and its great – well done on putting together such an excellent tool!

    I’ve noticed one bug and would be happy to submit the fix if you are accepting changes?

    Cheers, Nick.

    modhul

    July 15, 2009 at 5:58 PM


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: