Web Service Testing with soapUIPart 1 – Getting Started
soapUI is a web service testing tool by eviware. I found it extremely useful for trouble-shooting, unit testing and even load testing web services. soapUI generates SOAP test requests based on WSDLs and makes it very easy to work with the actual XML. There is no messing with web service proxies (clients) or writing programs; only for complex test scenarios you may have to do a little scripting. soapUI Pro adds a lot of features to simplify those advanced tasks but I will restrict this introduction to features available in the freely available open source version.
Get started and run a simple request
This is the main code behind my little Java/Axis 1.4 web service – I’ll skip the configuration details. It is a simple method that adds two integers and returns the result:
public class Arithmetics { public int add(int number1, int number2) { return number1 + number2; } }
The service is running here:
| End Point | http://localhost:8080/TestServices/services/Arithmetics |
| WSDL Location | http://localhost:8080/TestServices/services/Arithmetics?wsdl |
Now we tell soapUI to import the wsdl and create test requests:
- Open soapUI.
- Create a new workspace (File–>New Workspace; I named mine “Arithmetics Test”).
- Create a new project (Right-click the workspace and select New soapUI Project).
- Follow the dialog, pointing the project to the WSDL file. This binds the service definition and creates SOAP stubs for all requests.
- Click OK. soapUI will begin importing the service definition.

- Let’s examine what soapUI did during the imort: Expand the binding, select our method and open “Request 1″.

- Inspect the SOAP request with question marks where our values need to go.

- We can use this stub to run a request. You also can use the context menu to rename this request and add more stubs. Let’s replace the question mark with real values and click the “Run” button in the upper left corner: The request executes; once it is finished we can examine the results.

These simple steps have helped me out many times – they are a quick way to run a request against a service, troubleshoot problems with the XML structure and test specific inputs and outputs. But soapUI can do a lot more – stay tuned!
Anke
[...] Part 1 of the series can be found here . [...]
[...] you missed the first two parts of this series, you may want to check them out first here and here. Today I want to show a few more enhancements to make a test case more flexible. [...]
[...] working with web services. I previously wrote about how to get started and some test case basics here, here and here. I just want to add a few more tips I that took me a little bit of trying and [...]