Thursday, December 26, 2013

Basics of WebService Testing Tool SoapUI


Hi, In this post I am going describe some basics of SoapUI tool, like Creating projects, Creating Test Suite and Test Cases and Some important features.

Let’s Start with creating Project.

Create Project :-

To create project we need to have WebService WSDL file or the WebService Link. Here I will refer WeatherForecastService webservice and below is the link.



Now go to SoapUI there you can see in left pane as Projects, Here we are creating new project so Right Click on it and select “New SOAP Projects”. As shown in the below screenshot.




Once you click on this menu option you will see one window popups with two fields, as ‘Project Name’ and ‘Initial WSDL’. You Can enter Project Name as per your requirement or you can keep this field blank also when you browse for the WSDL or service link, then automatically Project Name appears. Initial field click on the Browse button to locate the WSDL file stored in your system or enter the service link. Once you provided the WSDL or Service link the window looks as below. (Here I have provided “WeatherForecastService” service link).


As you can see project name as “WeatherForecastService”. Keep below three fields as it is and click on OK button. Now you are done with project creation. And your project in SoapUI Looks as in below Screenshot.




In Above screen shot you can see the WeatherForecastService has two Request or say Operations. One is ‘GetCitiesByCountry and another one is ‘GetForecastByCity’.


Now we are done with Project creation, now will move on to Creating Test Suite.

Create Test Suite & Test Case :-

Creating Test Suite is very simple; just follow the few steps as mentioned in below screenshots.
When we created Project for WeatherForecastService we have noticed there are two Requests, now we will create Test Suite for ‘GetCitiesByCountry’ request.

Click on the (+) sign to expand the Request, there you will see soap request as “Request 1




Now Right Click on the ‘Request 1’ and Click on Add to Test Case




Once you select you will see a popup asks for the Test Suite name and Test Case Name, There you can enter any custom name as per your requirements, and enter the Test Case name also as below.


Here I have provided Test Suite name as “GetCitiesByCountry_TestSuite”.


Here I have provided Test Case name as “GetCitiesByCountry_TestCase”.



Once you entered both Test Suite Name and Test Case Name, you will see the one more popup window which contains GetCitiesByCountry Request name in it just click OK button to complete the Test Suite and Test Case Creation.



After Click OK button the finally Test Suite contains Test Case look as below.



Now we are done with the Project, Test Suite and Test Case creation. Now I am going to tell you how to create or Add Test Steps to our Test Case.



To Add Test Steps as per your requirement, Just Right Click on the “Test Steps (1)” Click on ‘Add Step’ and select which step you want add, as below screenshot.






That’s all Folks.

2 comments:

  1. How to do data driven testing in soap ui tool if the xml had CDATA( XML is taken as a string)

    ReplyDelete