Soap UI is a testing tool, primarily aimed at testing web services. This blog post is by no means a commercial for the tool, it is only a recap of my experiences with it. We use it extensively where I work, and it seems a good fit for both developers, testers and analysts.
One might argue that Soap UI is a narrow tool, only suitable for testing web services. That might be true, but breaking your architecture down into services is not limiting at all. It is a common way of enabling composability. Therefore I argue that having a tool that targets services in your BDD tool belt is not at all bad. Since its focus lies in services, much of the wiring is yours for free.
I assume that you know a little bit about Soap UI, at least its core constructs. If not, try the tool. There is a free version located at the Smartbear site. I will however point out that I am using the Pro version, which is not free. If you plan to do serious testing with Soap UI, buy that version.
Now this is not a post on BDD. Actually, I am quite new to the concept. But I strongly recommend reading the "Introducing BDD" post by Dan North or the "Specification by example" book by Gojko Adzic. For the scope of this post, knowing the concept of Given-When-Then is quite enough. For the remainder of this post I will recklessly use the term BDD, even though you might as well use specification by example or other similar terms.
Mapping BDD to Soap UI
First we identify three common building blocks used when building software with BDD:
The actual feature we are building, such as Login, Withdrawal or PublishBlogPost
In Soap UI, this maps well to Test suite. For this particular feature, we will have a suite of tests running.
Examples of using the feature. Some will be "happy", like Succesful login. Some will be "sad", like FailedLogin or NoConnectionWithBank.
This maps well to the TestCase of SoapUI. We will build our suite using several test cases presenting different usages of the feature.
Now this is where we find the "Given-When-Then".
Soap UI gives us the test steps that can be used for this level, even if we sometimes have to be a bit "clever" to keep it intact.
There we are! Let's examine the steps in more detail.