The soapUI tool makes it much easier to test Web services during development. It's also useful for interacting with third-party Web services to get a better idea of what to expect (and what to include) in the response.

SOA and Web services have revolutionised the way we work with Web applications and exchange data, but they can be very difficult to debug problems during development. There are numerous options available depending upon your development environment. The caveat is working with a Web service -- yours or a third-party -- once it has been rolled out. This is where the soapUI tool enters the picture.

Features of soapUI

The soapUI is designed to simplify the testing of your Web services; I also find it useful for interacting with third-party Web services to get a better idea of what to expect in the response, as well as what to include in the response. It was especially useful in a recent project utilising ChannelAdvisor Web services. Using soapUI, I was able to figure out the data expected in request objects.

SoapUI is accessible to both technical and non-technical persons. The easy-to-use graphical interface makes it simple to work with WSDL and SOAP-based Web services. It provides a Web service client that can automatically generate Web service requests and tests.

With the tool, you can work with XML and its many variations like WSDL. WSDL is easily imported via its URL, along with a great viewer for navigating and inspecting the WSDL source.

SoapUI offers extensive security features, which include Web service authentication and WS-Security. One of the cool features I like is the excellent SOAP monitor support; it allows you to easily monitor and analyse traffic.

The user interface is powerful; the soapUI tool also provides a command-line option. It allows you to run your tests via the command line, thus it can be easily automated in batch files.

Putting soapUI to work

Figure A provides a look at the soapUI interface with a new project created to access the Amazon S3 Web service. It includes the generation of a new request for the Web service's CopyObject method. A new request is generated by right-clicking a method name (in the left side of the IDE) and selecting New Request.

With the request generated, you can fill in the necessary data and submit the request via the green Play button in the upper left of the request window. A validation option is available as well to ensure the request XML is valid before you try to submit it. Once you submit a request, you can view the results to see the response (if there is one) from the Web service call.

Figure A: A new soapUI project created for the Amazon S3 Web service.

The ability to create mock objects is available within soapUI. It allows you to test a Web service without actually connecting to it. The feature is available by right-clicking a method.

In addition to running a request, you may create a new assertion for testing. The left pane (navigation area) of the IDE includes a node for Tests. This allows you to create new tests and test scripts for validation of proper Web service execution.

Integration

SoapUI easily integrates with IDEs and other tools to become a part of your development process. The list of IDEs includes Maven, NetBeans, IntelliJ IDEA, JBoss, and Eclipse. The other tools include code generation and WS-I options. Tools may be associated with soapUI via the Preferences window, as shown in Figure B, which include the configuration for the .NET wsdl.exe tool.

Figure B: Third-party tools may be integrated with soapUI via the Preferences window.

Getting soapUI

The soapUI tool is built with Java. The necessary Java files may be installed when soapUI is installed. Its reliance on Java means it can run on many platforms. The download page includes Windows installation files as well as tar files for other systems.

A great aspect of soapUI is its cost -- free! Well, the Basic version is available at no cost. A Pro version is available with a one year licence for US$349. The professional version includes everything that's in the Basic version, along with product support and additional features for testing such as re-factoring, data sources, and drag-and-drop editing.

Don't forget to test

Testing is an important aspect of every development project. It seems common to test a Web service as part of a bigger system via how the Web service is accessed. However, it is important to fully test the service itself. The soapUI tool allows you to easily write test suites and test cases.

A better way

The soapUI tool provides a great way to interact with and test Web services whether they are your own or third-party offerings. It is a nice alternative to other options I've used, such as the built-in features of Visual Studio or hand-coding SOAP requests.

How do you handle the testing phase for Web services? What tools are in your development toolbox? Share your thoughts and experience with the Web Developer community.

Wide World of Web This was published in Wide World of Web, check every Wednesday for more stories

Related links

Comments

1

Frank Cohen - 17/07/08

Thanks for very nice review of soapUI. It is my favorite test development tool. soapUI enables technical and nontechnical testers to work with work service interfaces and avoid the complexity of WSDL and SOAP-based Web services in an easy graphical environment.

PushToTest operates soapUI tests in a distributed test environment and provides hundreds of reports that enable users to do root cause analysis and remediation of SOA performance and regression problems. PushToTest repurposes soapUI tests into Business Service Monitors (BSM) with no additional programming.
PushToTest runs soapUI authored tests in a test lab of 10 servers to generate 2,000 concurrently running test suites. And the PushToTest distributed test environment scales even larger. PushToTest reports then show the target host environment's scalability index to help plan for hardware purchases and network bandwidth needs.

PushToTest provides training and support to teach the soapUI product, advanced soapUI topics, and using soapUI with PushToTest. Our Test Automation Bootcamp teaches our test methodology and gives you hands-on training in soapUI, Selenium, TestGen4Web, and PushToTest. Details at http://soapui.pushtotest.com.

PushToTest is also a multi-protocol, multi-tool platform. For instance one of our users submits parts catalog inventory information using soapUI and a SOAP interface and then confirms the inventory using a Web browser test built with TestGen4Web. PushToTest delivers this integration!
-Frank

» Report offensive content

Leave a comment

You must read and type the 6 chars within 0..9 and A..F

* indicates mandatory fields.

1

Frank Cohen - 17/07/08

Thanks for very nice review of soapUI. It is my favorite test development tool. soapUI enables technical and nontechnical testers ... more

Log in


Sign up | Forgot your password?

  • Staff Share a keyboard and mouse with Synergy

    Even in the era of virtualization, many IT pros (including myself) have a small army of computers sitting on, under, and around their desks. Read more »

    -- posted by Staff

  • Staff Android devs less than gruntled

    Yet more discouraging news on the Android front. Having hacked off its developer community by releasing updated SDKs to just a small group of chosen devs, Google has now given the brush-off to a petition that called for more to be given to the wider community. Read more »

    -- posted by Staff

  • Staff VMware shows how not to do it

    As a developer there will be a time when you ship a bug -- be it a stub that you left in, or a flaming, crashtastic segfault. The next time this happens and your bosses come baying for blood, point them in the direction of VMware, who this week gave the developer world a great example of how to ship a showstopper bug. Read more »

    -- posted by Staff

What's on?

  • Club Builder: Captain Obvious vs the Crackpots

    In the case of the bleeding obvious, IBM says open source needs good designers; a claim is made that China can activate your phone to snoop on you; and we take a look at the Defcon conference.