Professional Documents
Culture Documents
Symphony Services
Last changed: 12/14/2007
Document Revision Number: Draft Web-Services’ Testing Tools
By
Dinakar Adari
Table of Contents
TABLE OF CONTENTS ............................................................................................................................................................ 2
1. ABSTRACT ........................................................................................................................................................................ 3
2. AUDIENCE ......................................................................................................................................................................... 3
3. CURRENT CHALLENGES ............................................................................................................................................... 3
4. PREMISE ............................................................................................................................................................................ 3
5. AVAILABLE TOOLS......................................................................................................................................................... 4
5.1. ALTOVA MISSIONKIT .................................................................................................................. 4
5.2. PARASOFT SOATEST .................................................................................................................. 4
5.3. QUASAR .................................................................................................................................... 5
5.4. XAB TOOLKIT ............................................................................................................................ 5
5.5 ANTEATER ................................................................................................................................. 5
5.6 HTTPCLIENT, JUNIT, XMLUNIT ................................................................................................... 6
5.7 TESTING FROM BROWSER ............................................................................................................ 6
5.7.1 TRADITIONAL APPROACH ............................................................................................................ 6
5.7.2 MODERN APPROACH ................................................................................................................... 7
5.8 SOAPUI ..................................................................................................................................... 7
6. PROPOSED SOLUTION .................................................................................................................................................... 8
7. RESULTS / CONCLUSION ............................................................................................................................................... 9
8. REFERENCES .................................................................................................................................................................. 10
1. Abstract
In this white paper, an attempt is made to discuss various web-services’ testing tools available
and suggest the best possible solution.
2. Audience
Developers/Testers working on web-services’ projects
3. Current Challenges
Testing of web services is time consuming if test cases are executed manually, then comparing
the response with the benchmark responses to ensure the functional correction of the web-
services. The task would worsen exponentially as the number of web services pile up. So, a tool
which would build the service requests, send the requests across to the host server where the
web-service is deployed and give us the response to the request would be helpful.
4. Premise
In the context of SOA(Service Oriented Architecture), following are some of the activities that
happen during lifetime of a service:
a) Service Analysis
b) Service Development
c) Service Testing
d) Service Provisioning
e) Service Operation
f) Service Consumption
g) Service Change Management
h) Service Decommission
After a business process is identified for web service development, development of web service
is done using a web services stack, IDE (Stylus Studio, XMLSpy, Netbeans, etc.) and with a
choice of programming language (Java, .NET, C++, etc.). In the testing phase, unit, smoke,
functional, load testing is done to ensure that all the scenarios envisioned in the analysis phase
are met. Wide variety of software tools is available for testing but few provide with the complete
set for web-service testing.
Testing of web services is time consuming if test cases are executed manually, then comparing
the response with the benchmark responses to ensure the functional correction of the web-
services. The task would further worsen as the number of web services pile up. So, a tool which
would build the service requests, send the requests across to the host server where the web-
service is deployed and give us the response to the request would be helpful.
5. Available tools
Following are some of the testing tools available for web-service testing:
a) Commercial ware:
5.1 Quasar Soap Test Client(Shareware)
5.2 Altova MissionKit
5.3 Parasoft SOAtest
With each of the above tools, the underlying communications with the web service hosting server can
be captured from one of the many monitoring tools like TCPmon, ethereal/wireshark, MS Network
Monitor, snoop, Kismet, Netstumbler, etc. Let’s take a deeper look into each of the tools.
5.3. Quasar
Quasar is a SOA testing tool, allowing for easy monitoring and generation of SOA events. Quasar is a
light weight tool for unit testing a variety of SOA components. The tool comes with an embedded XML
editor. Some of the key features of it include:
1) Make SOAP requests (also available through command line interface)
2) Reply to SOAP requests
3) Unit test your SOAP services
4) Regression test your SOAP services
5) Stress / Performance test your JMS components
Disadvantage: The product is not maintained anymore and even with the existing one, in order to use it
you will have to edit the files to fill in default test values and assertions to test. You will also need to
create scripts to call the tests you want to run.
5.5 Anteater
Anteater is a testing framework designed around Ant. It provides an easy way to write tests for
checking the functionality of a Web application or of an XML Web service.
Following is a typical scenario which can be executed using Anteater
• Send a HTTP/HTTPS request to a Web server. When the response comes back, test that it
meets certain criteria. You can check for HTTP headers and response codes, and validate the
response body with regular expression, XPath, Relax NG, or contentEquals tests, plus some
binary formats. New tests can be easily added.
The ability to wait for incoming HTTP messages is something unique to Anteater, which makes it
especially useful when building tests for applications that use high level SOAP-based communication,
like ebXML or BizTalk. Applications written using these protocols usually receive SOAP messages, and
send back a meaningless response. It is only later when they inform the client, using an HTTP request
on the client, about the results of the processing. These are the so-called asynchronous SOAP
messages, and are the heart of many high-level protocols based on SOAP or XML messages.
Disadvantage: Anteater, (HttpClient, JUnit, XMLUnit) combination needs much of the add-on features,
customization needed for a full-fledged web-service testing tool.
Disadvantage: ‘Testing from browser’ can be used only when testing is required on a
small scale and scalability is another big problem with this approach.
5.8 soapUI
soapUI is a free and open source desktop application for inspecting, invoking, developing,
simulating/mocking and functional/load/compliance testing of web services over HTTP. Functional and
Load-Testing can be done interactively or within an automated build/integration process using the
soapUI command-line tools.
Key features:
1) Besides just sending SOAP requests, groovy scripts can also be executed with which state of
the database can be prepared, so that a full and clean test cycle is created.
2) soapUI supports functional testing of Web Services by providing a TestCase metaphor where a
number of TestSteps can be executed in sequence. There are currently six types of TestSteps
available. TestCases are further organized into TestSuites of which an arbitrary number can be
created within each project.
3) Opt for default parameters which are set as parameters for the service. During importing the
WSDL, tick the checkbox asking to create a SOAP request for each operation, if you want one.
If you double click the request you can see the content of the SOAP request in the main window
Results of the call can be seen in the adjoining window. To make a good test tool we need to create a
new test suite in our project and add test cases to it. With these test cases you can send your custom
SOAP requests and check the response with assertions. This can be done by right-clicking the web-
service created and choosing 'Generate Test Suite' option. This generates a test suite with one test
case for every operation. Expand the Test Steps node and double click at the operation to see the
simple SOAP request in the main window. Assertions can be added at web-service or operation level.
This helps in not only checking if the service is reached but also checks if the content of the response is
what you would expect to be returned by the service.
Disadvantage: This product suits most of the needs but a bit of customization in terms of giving inputs
to the tool would make this a perfect one.
6. Proposed Solution
soapUI++
Considering the approaches discussed above, soapUI++ fits the bill perfectly.
soapUI++ is an extension to soapUI making it specific for Lawson CAPI project. As soapUI itself is
developed in java and it’s API publicly available, extra features can be added to the existing tool (which
in itself facilitates for manual testing of web-services).
One of the best things about soapUI is that it provides tools for running test cases. These tools can be
used in association with the APIs provided with the application to create application specific tools.
‘SoapUITestCaseRunner’ is one such tool which runs specified TestCases and reports/exports results
as configured.
soapUI++ runs as a batch of operations. It requires 2 kinds of inputs -
1) A batch file, containing the necessary web-services/individual operation of web-service. The
operations specified in this file are executed in sequence.
2) Input values for each operation is specified in another file which is used in populating the SOAP
request(used in step 2 specified below)
Following steps are automated using soapUI++:
1) Creation of SOAP request
2) Populating the SOAP request
3) Sending the request to the server on which web-services are deployed
4) Receiving the response
5) Comparing the response with that of the benchmarked response
6) Logging the result of comparison, other important events during this process for analysis purpose.
soapUI++ gives the flexibility to run requests at operation/web-service level and in test/benchmark
mode. In benchmark mode, the output is stored, against which the test cases are compared.
7. Results / Conclusion
Benefits:
1) Minimal manual intervention
2) Speedy execution of test cases
3) Saved time
4) Scalable for any number of web-service/operations
5) Reduced effort for future execution
Technical Advantage: This framework is currently used for ‘Functional Testing’ of web services over
HTTP. It’s best used during configuration/environment changes of the server and that when the same
set of web-services are to be checked for new configurations/environments. Ex: Deploying of web-
services developed in older versions in new versions requires the testing of all developed web-services
against the new environment.
Furthermore, the framework’s functionality can be extended for
1) Load, Compliance testing
2) Inspecting, invoking, simulating/mock testing of web services.
Cost Savings:
1) Man days: Though, the exact savings in man days is not captured, ratio of automation to
manual testing is 30:1 per web-service operation.
2) Cost of software: Using free and open source software reduces
a. Cost of procurement of the product
b. As the source code of the final product is available, maintenance costs if any can be
internally borne.
8. References
1) SOA Testing:
https://www6.software.ibm.com/developerworks/education/ws-soa-autotest2/section2.html
2) Web Services in Mozilla:
http://developer.mozilla.org/en/docs/Accessing_Web_Services_in_Mozilla_Using_WSDL_Proxying
3) SOAP scripts in Mozilla:
http://lxr.mozilla.org/mozilla/source/extensions/webservices/docs/Soap_Scripts_in_Mozilla.html
4) soapUI vs. JUnit: http://www.myarch.com/soapui-vs-junit
5) soapUI: http://www.soapui.org/
6) Wireshark: http://wiki.wireshark.org/
7) Gecko engine: http://en.wikipedia.org/wiki/Gecko_%28layout_engine%29
8) Security Restrictions on cross-domain access:
http://developer.mozilla.org/en/docs/Bypassing_Security_Restrictions_and_Signing_Code
9) Calling SOAP Servers from JS in Mozilla: http://www.onlamp.com/lpt/a/5981
10) Signed scripts in Mozilla: http://www.mozilla.org/projects/security/components/signed-scripts.html
11) SOAP in Gecko browsers: http://developer.mozilla.org/en/docs/SOAP_in_Gecko-based_Browsers
12) Using Mozilla SOAP API: http://www.oreillynet.com/lpt/a/2677
13) Quasar:
http://www.integrationcentral.com/product.html?gclid=CLWXmZjX_Y8CFUaPOAodBw0_MA