joshi737
joshi737

Reputation: 879

How to test SOAP Services?

How do you guys Test your SOAP Services? Do you use Tools like soapUI or do you write Unit Tests? Just wanted to hear some opinions, what you prefer, what the advantages or disadvantages of both approaches are? And if someone writes Unit Tests, can you give me an example how to write those???

Edit: I developed a lot of REST services, which I usually tested using JUnit and a REST Client Framework. So when the REST Service was deployed, I was able to invoke those services with as a JUnit Test using a http connection. Is there something similiar in SOAP too? Does anyone have an example code for a SOAP Client?

Upvotes: 5

Views: 4637

Answers (5)

ThomasRS
ThomasRS

Reputation: 8287

I've written a small library which does most of the heavy lifting of unit-testing SOAP services. Basically you'll get mockito mocks which are easy to work with.

Upvotes: 0

Ashish Kumar Gupta
Ashish Kumar Gupta

Reputation: 279

The best way to test your SOAP service is by using the SOAPUI testing tool.

With JDEF you can create your SOAP Application, following SOAP standards - and then easily verify this through the Enterprise Manager Console provided by Oracle.

You just get an instance of that particular service, and then you can see the audit flow.

Upvotes: 5

bvanvelsen - ACA Group
bvanvelsen - ACA Group

Reputation: 1751

I use both Junit for functional low-level testing of my functions and back end code. And I use SOAPUI to test the Web Service. Also keep in mind that you can run SOAPUI tests from within unit tests as desribed here. example:

public void testRunner() throws Exception 
{
  SoapUITestCaseRunner runner = new SoapUITestCaseRunner(); 
  runner.setProjectFile( "src/dist/sample-soapui-project.xml" );
  runner.run(); 
}

Upvotes: 4

lash
lash

Reputation: 228

I'm using both. Basically JUnit for simple automated unit tests. And SoapUI for more complex system tests which make more that a single web service call.

Upvotes: 1

Ratha
Ratha

Reputation: 9702

If you like to test services you can use SOAPUI tool which is easy. But if you like to test service's functions are wroking right or not, you need to right unitest. That means if you are the author of the webservice, you might need to write unittests to check the functionalities.

Upvotes: 1

Related Questions