Step by step process to perform automation test using SoapUI
What is SoapUI?
SoapUI is an open source functional testing tool used for SOA and Web Service testing. Using SoapUI you can perform functional, regression and load testing. SoapUI works on xml where you can send the request through xml and get the server response. Using SoapUI its very easy to create different test suits and test cases with different data and use them to perform web services test.
What kind of testing can be done with SoapUI?
We can perform functional, regression and load testing on SOA and Web Services using SoapUI.
How to download and install SoapUI?
Download SoapUI:
Click on the link to download SoapUI – Click Here
Install SoapUI:
Please follow the process to install SoapUI:
Installing SoapUI is very easy, once you downloaded .exe file successfully, just double click on the file and follow the instructions to install. Once SoapUI installed successfully it will look like this-
How to perform automation test for web services using SoapUI?
Follow the steps to perform automation test for web services by creating a new Soap Project:
1) Go to the File and then click on New Soap Project.
2) Enter Project Name . You can enter any name of your choice.
3) Enter Initial WSDL url –
http://www.webservicex.net/CurrencyConvertor.asmx?wsdl
WSDL is nothing but end point url which should be provided to test web services.
4) Click OK.
Once you click OK you will see a new project has been created in left side, this project is to convert the currency of one country to another country.
5) Double click on Request1 will load the script.
6) We have Request ready and now have to see the response after adding the value to the request and trigger it.
7) Now I am going to test this service by adding the FromCurrency as USD and ToCurrency as INR and trigger the request.
You can run the script by clicking on green color arrow shown on the top.
Now we can see the response here that currency has been converted and fetched in the response, so this web service works. Similarly we can test this web service by changing the request.
Now lets create different test cases with different values:
1) Click on (+) logo to add test case.
2) You can give any name of this test suite. If you won’t give any name it will take default name as TestSuite1.
3) Click OK button will ask to enter Test Case name. You can enter any name.
4) Click OK button will open another pop up Add Request to TestCase-
5) Click OK button again will create the test case.
6) To run this test case simply click on green arrow shown on the top
It will take few seconds and your test will be completed. If your test gets passed you will see it is green in color otherwise it will be red in case test fails.
Similarly you can create more than one test cases by adding different values in the request.
How to add and validate Assertion in test cases:
1) Double click on ConversionRate-Request1.
2) Click on Adds an assertion to this item icon shown on the top.
3) Click on XPath Match and then click on Add button.
4) Declare XPath expression which you want to validate and provide the Expected Result in the box.
5) Click on Save button and run the script by clicking on arrow shown on the top.
Once you run the script you can see the result at the bottom with validation passed or failed.
Hope this quick tutorial will help you to configure SoapUI and create your first SoapUI project.
very useful and informative. Thanks for sharing.
Very helpful. Thanks!
Reading your content gave me a lot of interesting info , it
deserves to go viral, you need some initial traffic only.
How to get initial traffic??? Search for: masitsu’s effective
method
1. Can we perform automated test using soapui with test data coming from excel? execute numbers of test cases in a loop? If No,
can we integrate tools like selenium to perform test automation with soapui?
Selenium is for testing the interface, not web services.
Simple and clear.. Nice article