In the preceding SoapUI tutorial, we discussed SoapUI and SoapUI Pro installation processes. In this fourth tutorial of our SoapUI training series, we will start using SoapUI for a test project:
Recommended IPTV Service Providers
- IPTVGREAT – Rating 4.8/5 ( 600+ Reviews )
- IPTVRESALE – Rating 5/5 ( 200+ Reviews )
- IPTVGANG – Rating 4.7/5 ( 1200+ Reviews )
- IPTVUNLOCK – Rating 5/5 ( 65 Reviews )
- IPTVFOLLOW -Rating 5/5 ( 48 Reviews )
- IPTVTOPS – Rating 5/5 ( 43 Reviews )
Key learning points include:
- Creating a SOAP project- add WSDL during the creation or afterward
- Request and Response Verification
- Utilizing TestSuites, TestCases, and TestSteps
Let’s get started.
Working on SoapUI Projects:
Making a new project by adding the WSDL:
#1. Launch the SoapUI application and proceed with the licensing procedure
#2. Select the New SOAP Project option from the File menu or use the shortcut key CTRL+N.
#3. Provide a suitable name for your project
#4. Next, insert the valid WSDL URL into the provided text box. For this exercise, we will use the currency convertor URL i.e. http://www.webservicex.com/CurrencyConvertor.asmx?wsdl. (There are several other sample WSDL URLs available. Look for open-source Web services with diverse options)
#5. All other settings can remain at their defaults, click OK. A WSDL processing progress dialogue should appear (Please note: an internet connection is required for this to operate)
#6. Once the WSDL URL is processed successfully, the SOAP project will be created along with the service requests.
The URL used in this guide can be accessed globally via the Internet. This web service is hosted on a web server. When the URL is called, it will search for the hosted server and load the SoapUI project with the services contained in it, as indicated below:
The creation of the project is now completed!
Adding a WSDL to an existing project:
#1. Do a right-click on the Project Name within the Navigator panel
#2. Choose the Add WSDL option or use CTRL + U
#3. The Add WSDL dialogue box will show up on the screen.
#4. Insert a valid WSDL URL in the provided text field as shown below:
#5. Click OK
#6. The URL will be processed, and the related services will be loaded into the SOAP project as demonstrated below:
Executing Services & Checking Responses:
#1. Expand the CurrencyConvertorSoap in the tree (click on the +)
#2. Double-click on Request1 (the service name, which can be altered if necessary)
For more clarity, please refer to the screenshot below: (Click on image for a larger view)
#3. Choose the XML tab in the request section. This will present the input request for the currency convertor web service as displayed in the screenshot below. (Click on image for a larger view)
In the aforementioned screen, question mark (?) symbols symbolize the input parameters for the currency convertor web service.
Upon clicking the run/start button, SoapUI will invoke the currency convertor web service along with the supplied parameters in the request. Subsequently, the web server will receive these input parameters and process them. After completion, the server will dispatch the response back to SoapUI.
There may be times when the response includes error messages. For example, while processing the input request, a server might be down or an Internet connection might not be stable on our end. In such situations, we will receive a response that contains an exception.
As an example, if we insert USD for <<From Currency>> and INR for <<To Currency>> with valid values as shown below and call the service, we will get the correct response as demonstrated below.
(Click on image for a larger view)
To examine a negative scenario, let us modify the <<From Currency>> to the US and run the service.
(Click on image for a larger view)
In this situation, we received obscure error messages due to invalid input. The same error messages will be displayed in the error log tab.
TestSuite, TestCase, and TestStep in SoapUI:
A test suite is a centralized silo that contains numerous test cases. It represents a compilation of test cases that depict the application’s flow. Test cases offer detailed information about the application flow. Each test case incorporates individual actions known as test steps.
In SoapUI, the test suite is the baseline node that needs to be explicitly established, and test cases can be appended to it. Test cases can then have