Our team has been building WCF based web services for the last few years to support data integration between disparate systems in the enterprise. Web services are a natural fit for this type of integration because they offer flexibility for cross-platform exchanges and are easily configurable to traverse firewalls inside of the corporate network. We’ve had a lot of success creating and utilizing these services and we are building an ever increasing number of them for transferring business data between systems. In some ways we may even be victims of our own success. J The volume of services we’ve created and need to support have grown to such an extent that they have become time consuming to maintain and support.
In order to decrease this support burden, system verification of these services has been one of the areas we’ve been struggling to automate. We have unit tests written against our framework and even have some nice integrations tests that exercise our services against a set of mock data, but we don’t have an automated way to verify our services on our test or production environments. Whenever there are patches or deployments to these environments we’ve had to do this type of verification manually.
One possible solution to this problem initially considered was the use of a C# testing project and a test framework such as nunit for the creation of these tests. This type of scenario was very appealing because it provided a lot of flexibility in test creation, developers are already familiar with the toolset, and the test could easily be executed on our existing CI environment. However, the big downside to this approach is the sheer amount of time it takes to write well-written and easy to maintain verification tests across a large number of services and environments (dev, test, production).
In search of an easier way to create and maintain these tests, we began looking for tools that had already addressed this issue. We evaluated different alternatives and ended up deciding to use a product called soapUI.
soapUI has an open source (free) version of their tool and a professional version (paid). The professional version offers the same functionality as the open source version but adds features that make it much easier to create test assertions, data driven tests, multiple target environments, enhanced reporting, and improved support. soapUI is the best web service testing tool we’ve used. It has an incredible amount of power and flexibility. Although sometimes it might not be straightforward, there has been a mechanism to support all of our testing requirements up to this point.
With this power and flexibility comes quite a bit of complexity. The tool itself has a dizzying array of controls, buttons, windows, tabs, frames, icons, click menus, etc. The interface can be overwhelming and completing simpler testing tasks can be more confusing and require more effort than should be necessary. The UI of the application could be greatly improved by simplification and focus on the most common tasks. The more advanced functionality could still be available to power users, but doesn’t need to clutter the main interface like it currently does. However, even with the cluttered UI, the power of the tool really shines through.
Once you get past the learning curve and get used to the interface, soapUI provides very powerful ways to quickly create tests, complex assertions, and data driven tests. It also makes it very easy to clone and reuse test cases, test suites, and project level data.
At this point we’ve just begun creating tests and working with soapUI, but it looks like it’s going to be a great tool to assist with the verification of our services. As I learn to leverage the tool, I plan to post tips here on ways to use it more effectively, so stay tuned if you’re also testing services.