As a web service is something that has no user interface, we can’t interact with it without a special tool. That tool should allow composing XML requests via its own user interface. Commonly such user interfaces are text editors where you write your XML requests and controls for posting requests to the server.
Why not just unit tests?
Unit test is essential for every piece of program code. In many companies there is even a convention that code that did not pass unit test is not given for testing by quality control people. Unit test is simply part of development, not testing.
The minuses of considering passing unit tests enough acceptance criterion for a web service are:
- Unit tests are developed by a developer. Usually by the same person who has developed the application being tested. If a developer misunderstood a requirement or made a mistake in program code, many of his faults will be duplicated in the unit test.
- Classical unit tests are designed to test internal program code. But what is needed is to generate and run SOAP requests to web service methods. So if follow terminology that will be not unit tests but automated tests. And automated testing is activity carried out by testers, not developers.
- Project structure. As in every well-established testing activity, I’ve started with test specification. The main part of a test specification is test cases divided into test areas. SoapUI allows structuring your test project into test suites (the same as test areas in my test specification) that contain test cases, which can contain test steps. This structure is well-managed in SoapUI – you can add, modify, delete and change order of every item in the structure.
- Test cases. SoapUI provides enough convenient tools to manage and run your test cases, and view SOAP responses to your test requests.
- You can perform Load Testing.
- Automation. But what if your web service contains too many methods with too many input and output parameters? It may take several days for each complete test of your web service if your tool does not provide functionality to automate your testing. SoapUI supports Groovy Script – a scripting language that is very similar to Java. I’d classify it as ‘light Java’. You can write scripts to access the database which is used and / or influenced by your web service. You can automate validation of your web service’s response against you input. You can automate the output of validation results into a file (which could be just a text file of HTML depending on your choice). And you can run an entire test suite with one click, which, combined with your validation and output automation scripts, allows you to perform entire test of your web service in minutes.
Free vs. Paid Version.
Paid version provides more convenience and is very good if you do not have experience in programming or scripting. For example, instead of finding out how to connect to a database in the free version, you can buy paid version which contains a special type of test step – "database connection". Read more at the product comparison page.
Summary.
Testing should be performed by somebody anyway it requires resources in any case. Of course project manager can assign developers who can write scripts similar to unit tests but testing not only internal methods in program code but making correct test requests via SOAP protocol. But since testers are responsible for testing why not use tool that does not require knowledge of complicated technologies like .NET? A tester who has some experience in programming can organize and perform test activities efficiently with help of SoapUI.






14 comments:
eclipse has a plugin to test web services as well - and it's free :)
Hi Jay, thanks for your comment. SoapUI is opensource and free as well. They just propose extended funtionality for money but I believe free version is enough in most cases.
Yes, the free version of SoapUI is very good for a minimal web service. You can run a mock webservice based on the wsdl. You can modify the response and see the request. It's very fun to use it.
Sincerely I like it and I can tell you it's my favorite tool.
Hi Stephane. Thanks for your comment. To tell the truth this is the only tool for testing web services I've even tried. But I've found that it's good enough to test medium-sized web services as well because of automation support.
Hi Nikita,
Thanks for giving information on such good tool.Iam very new to Webservice.Could you please let me know where i need to start to learn more about SOAPUI
Regards,
SB Raghavendra
Have you tried these links from the post?
http://www.soapui.org/
http://groovy.codehaus.org/
Good luck ;)
Hi!
I've a question about . How can I test several webs services at once, with soapUI tool?
Thanks it advance
Hi :)
The best way is to have a separate project for each web service. You can manage all the projects within a single soapUI session.
The link to wikipedia is bad. It links to Soap instead of SOAP.
Thanks Ádám. Fixed.
Have any of you used FitNesse for webservices testing. I understand it is an acceptance testing tool and runs on the FiT framework. But why not FitNesse for component based testing?
Hi yega :)
I don't know anything about it.
Maybe you tell us why FitNesse?
Hi Nikita,
I have been using SOAP UI tool for web services testing. It would be great if you can share your knowledge on how to integrate Quality Center (Test management tool) with Soap UI tool.
Thanks in advance ... :-)
Hi Tarini :)
I haven't try to do that but if you use Quality Center you might want to use QTP to test web services as QTP and Qualty Center are from the same vendor :)
Post a Comment