SOA / Web Services / Java

A Technology Blog

Archive for the ‘SOA Testing’ Category

Membrane SOAP Client – A beginner’s web service testing tool

Posted by Vivek on February 10, 2013

Those who are new to testing web services often complain about lack of a free tool that provides UI. Though SOAPUI has great capabilities, it requires you to have some understanding of XML. Even though XML is not a complex language to understand but it is sometimes hard for a beginner to find syntax errors or modify it. I find Membrane’s SOAP Client tool useful in such cases. All you need is to import the WSDL file and it generates a form containing text boxes for request parameters.

You can view the HTTP headers too like SOAPUI. The biggest disadvantage is that it only supports username authentication token for secutity. It is not a tool if you want support for WS-* standards. Anyways, you can edit the header details in the XML view of tool.

This tool can be downloaded from http://www.membrane-soa.org/soap-client/

 

Advertisements

Posted in Java/J2EE, SOA Testing, Web Services | Leave a Comment »

SOA testing tools – A comparitive study

Posted by Vivek on January 5, 2013

This is my attempt to compare the various SOA testing tools in the market. Please feel free to provide your suggestions or comments.

Sr No

Features Crosscheck Networks SOAPSonar 3.0.5 iTKO LISA 3.6e Mindreef SOAPscope (Progress Actional) Parasoft SOAtest 5.1 Rational Service Tester Greenhat (Rational Test Workbench) SOAP UI Pro

1

 Learning curve Medium Medium Simple Medium Simple Medium Simple

2

Simple Navigation Y Y Y Y Y Y Y

3

Dynamic Data Population Y Y Y Y Y Supported in GH Performance (Rational Performance Test Server) Y

4

Project Save, Merge, Import, and Export (allows Team Project Sharing) Y Y Y Y Y Y Y

5

WSDL Merge (services, operations, XSD schema) Y X X X X X X

6

Clone Test Suites, Test Groups, Test Cases, Test Settings Y Y Y Y Y Y Y

7

Run Test Suites from HP Quality Center Y Y X Y X Y X

8

WSDL Operation Response/Request Chaining Y Y Y Y Y Y Y

9

WS-Security and Identity Management Digital Signature, Encryption, Username, X509, SAML, Kerberos Y Y Y Y Y Y

10

SOAP with Attachments (DIME and MIME) Y Y   Y Y   Y

11

WS-Addressing Y Y X Y Y Y Y

12

XSL Transformation Y X   X X X X

13

Design Time WSI-BP 1.1 Compliance Y Y Y Y X Y Y

14

Report generation PDF, XML, CSV formats PDF, HTML, CSV, Excel PDF Y CSV, HTML, RTF Y PDF, HTML, RTF, Word, Excel

15

Data Source Support CSV, Excel, SQL Server 2000/2005, Oracle SQL, ODBC, JDBC, Excel, Raw file SQL Server
Oracle
DB2
PostgreSQL
MSDE
Apache Derby
CSV, Excel, relational databases X via JDBC via JDBC

16

Regression Testing Suite Y Y Y Y Y Y Y

17

Record and Playback X Y Y X Y Y Records HTTP traffic

18

Extensible Y Java support Limited Y Y Y Supports Groovy and JavaScript

19

Performance Testing Support Y Y Y Y Using Rational Performance Tester Y Y

20

MQ Support Y Y X Y Y Tibco EMS, IBM MQ, Sonic MQ X

21

REST Service Support Y Y Y Y X Y Y

22

JMS Support Y Y Y Y Y Y Y

23

Stub Generation Y Y Y Y Y Y Y

24

SMTP Support Y     Y X Y  

25

SOAP 1.2 Support Y Y Y NA NA NA Y

26

OS Platforms Windows. SOAPSonar can be run on MAC and UNIX based systems through the use of a Virtual Machine running a Windows OS Windows (XP/Vista/Me/2000), Linux, Unix, Solaris, Mac OSX Microsoft Windows
Red Hat Linux,
Enterprise Linux,
pSeries
Solaris (including
the x86 series)
HP-UX
IBM AIX
SUSE Linux
Enterprise
Windows, Linux, Solaris, Mac windows and linux AIX, Linux, Solaris, Windows Windows, Linux, Mac

27

UDDI Support   Y X Y Y Y X

28

Policy Enforcement Y Y Y Y Y WS-Policy X

29

Mock Service Y Y Y Y Y Y Y

30

Asynchronous Service Testing   Y   Y asynchronous using WS-Notification Y X

31

UI Support Y Y Y Y X Y X

32

Industry Specific Data Formats X Out of the box support X X X HL7, MLLP, SWIFT, FIX, IATA, AMQP X

33

ESB Support IBM, Tibco, Oracle IBM, TIBCO , Software AG / webMethods, Oracle , Progress, Cordys, SAP, Microsoft Oracle, IBM, Jboss, SAP NA NA IBM, Tibco, Software AG, Oracle, SAP NetWeaver NA

34

Variants Personal Edition, Standard Edition, Automation Edition, Platinum Edition. (Personal Edition lacks features such as WS-Security validation, performance testing, and vulnerability testing) NA NA NA Rational Service Tester, Rational Performance Tester GH tester, GH Performance, GH VIE SOAPUI, SOAPUI Pro

35

License Commercial (Free – Personal Edition) Commercial Commercial Commercial Commercial Commercial Commercial (Free – SOAPUi)

Posted in SOA, SOA Testing, Web Services | 6 Comments »

SOAMOA – New kid in the block

Posted by Vivek on May 15, 2010

This is just an extension to my previous post (SOA Testing). Most of the java developers look to automate web service testing. If you are using SOAPUI, this is possible by writing junit test cases and then invoking SOAPUi projects from junit for a particular test case. It might be the case that you do not want to rely on any tool while testing and end up creating test cases that creates and invokes request for you. With the same intention, I was looking for a free tool and found this one – SOAMOA.

Still in its infancy stage, this tool may not be used for all your testing needs but some features look promising. The GUI is not too great. It doesn’t offer you to set preferences and does not support web services standards. For all this, you already have a free tool SOAPUI (not the pro version). The only striking feature is the ability to generate junit test cases and groovy script based upon your request. You just need to import your WSDL and create SOAP Request as you generally do in SOAPUI. 

If you have a request, for eg.

<SOAP-ENV:Envelope xmlns:SOAP-ENV=”http://schemas.xmlsoap.org/soap/envelope/“>
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body xmlns:web=”http://webservices.service.employee.com/“>
        <web:getEmployeeDetail>
            <arg0>
                <employeeId>2000</employeeId>
                <employeeName>Monster</employeeName>
                <company>hell techologies</company>
            </arg0>
        </web:getEmployeeDetail>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Creating Groovy Script for the request will produce the following:

/* Generated GroovyWS Script by SoaMoa, :vivek at Sat May 15 10:53:13 GMT+05:30 2010 */

import groovyx.net.ws.WSClient

def proxy = new WSClient(“file:/C:/…../WEB-INF/wsdl/EmployeeService.wsdl”, this.class.classLoader)
proxy.create()
def arg0 = proxy.create(“com.employee.service.webservices.GetEmployeeDetailRequest”)
arg0.employeeId = 2000
arg0.employeeName = ‘Monster’
arg0.company = ‘hell technologies’
def getEmployeeDetailResponse = proxy.getEmployeeDetail(arg0)

A junit class will look like:

/* Generated Testcase by SoaMoa, :vivek at Sat May 15 10:59:54 GMT+05:30 2010 */

import java.util.Map;
import javax.xml.namespace.QName;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPConstants;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPMessage;
import javax.xml.soap.SOAPPart;
import javax.xml.ws.Dispatch;
import javax.xml.ws.Service;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.soap.SOAPBinding;

import java.util.Iterator;

import junit.framework.TestCase;

public class GetEmployeeDetailTest extends TestCase {
public void testGetEmployeeDetail() throws Exception {
String endpointURL = “
http://myhost:myport/MyApp/services/EmployeeService“;
QName serviceName = new QName(“
http://webservices.service.Employee.com/“, “EmployeeService”);
QName portName = new QName(“
http://webservices.service.Employee.com/“, “EmployeeServiceWSPort”);
Service service = Service.create(serviceName);
service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, endpointURL);
Dispatch<SOAPMessage> dispatch = service.createDispatch(portName, SOAPMessage.class, Service.Mode.MESSAGE);
MessageFactory messagefactory = MessageFactory.newInstance(SOAPConstants.SOAP_1_1_PROTOCOL);
SOAPMessage request = messagefactory.createMessage();
SOAPPart part = request.getSOAPPart();
SOAPEnvelope env = part.getEnvelope();
SOAPBody body = env.getBody();

body.addNamespaceDeclaration(“web”, “http://webservices.service.Employee.com/“);
    SOAPElement getEmployeeDetail = body.addChildElement(“getEmployeeDetail”, “web”);
        SOAPElement arg0 = getEmployeeDetail.addChildElement(“arg0”);
            SOAPElement employeeId = arg0.addChildElement(“employeeId”);
            employeeId.addTextNode(“2000”);
            SOAPElement employeeName = arg0.addChildElement(“employeeName”);
            appId.addTextNode(“Monster”);
            SOAPElement company = arg0.addChildElement(“company”);
            EmployeeId.addTextNode(“Hell Technologies”);           
request.saveChanges();

SOAPMessage response = dispatch.invoke(request);
SOAPBody replyBody = response.getSOAPBody();
}
}

 

Posted in SOA Testing | Tagged: , , , | Leave a Comment »

SOA Testing – Tools in the market

Posted by Vivek on May 9, 2010

Here is a list of the leading testing tools available in the market to test the SOA components. I believe that no tool can completely fulfill the testing requirements of an SOA but you can accomplish a lot. The tools should be intelligent enough to carry out:

i. Schema/ WSDL/ SOAP validation
ii. Simulation of webservice, both client and server  i.e., mock services
iii. Testing of web services standards such as web services addressing, security, reliable messaging etc.
iv. WS-I conformance testing
v. Testing of intermediaries
vi. Governance testing. Validation of design and run time policies and Service versioning.
vii. Asynchronous and notification framework testing
viii. Orchestration and Choreography testing
ix. Performance testing

Below is a list of tools that cover some or most of the above points:

1. Green Hat GH Tester : This tools provides comprehensive testing of SOA. Helpful in providing performance and security related testing and validation of SOA and BPM components. You can monitor SOA performance and track service invocation and response.

2. Mindreef SOAPScope Server : Acquired by progress software. Allows creation of mock services, validation and compliance checking.

3. Parasoft SOATest : Helps in performance or load and security testing. Provides governance testing by performing policy enforcement checks. Allows creation of mock services and performing regression testing.

4. Crosscheck Networks SOAPSonar : Performs functional, performance, compliance, and security testing across SOAP, XML, and REST based services.

5. iTKO Lisa : Performs UDDI test/ validation, performance , validation and compliance and mock service testing.

6. Matador Tech Tester : suitable for validation and regression testing.

7. SOAP UI: Performs functional, load/ performance and mock service testing. Also helpful in validation and compliance testing.

 

Posted in SOA Testing | Tagged: , , , , , , | 7 Comments »

Testing ESB that choreographs web services

Posted by Vivek on March 28, 2010

It is not easy to test components of a service oriented architecture. Many people use the terms SOA and Web Services interchangeably and think that SOA cannot be implemented without web services.  However, this is not true. Web Service is just a way to implement SOA. There are projects which do not use web services but still inherit merits of a SOA. Grid Computing is one such example. So if you have a project where you have used an ESB to choreograph web services to achieve a desired functionality, then testing these web services (using a tool like SOAPUI etc) is not enough. One many not be interested only in testing the business functionality but also in testing the integration logic that resides within an ESB. This may not sound feasible as in most of the cases there are more than one webservice and each will accept input in a different format. So you cannot simulate all web services. But you definitely create a wrapper service that can accept request in any format and helps you  gauge whether your ESB has performed its job before invoking the service. Now what does a wrapper service do in this case:

1. No changes required in the ESB. Just a small configuration so that when you perform a dynamic lookup of end-point, the request is always directed to the wrapper service.

2. The wrapper service does not require implementing operations for each request. One operation that takes an Object as an input can serve the purpose.

3. A SOAP Handler that validates the SOAP Header and a function call from handleRequest method of SOAP Handler to validate the SOAP Body or message payload can be implemented.

4. No testing tools required. Leverage junit and xmlunit to perform assertion. Optionally, use APIs provided by SOAPUI to invoke test cases defined within your SOAP UI project to perform service validation.

Posted in SOA Testing | Tagged: , , , , | Leave a Comment »