Introducing SoapUI Pro:
SoapUI comes in two version- Open source free (SoapUI) and SoapUI Pro (now SoapUI NG pro).
So far we were discussing the common automation concepts and functional testing basics such as creating projects, test suite/case/steps, properties, assertions, groovy script programming etc. You can check all these tutorials from this SoapUI series on this page.
Now, it is time for us to examine SoapUI Pro and its salient features which are more refined and are targeted at better and faster testing.
Note that we have not discussed features of SoapUI NG Pro version here. Apart from the few new features, all the features discussed below are also present in SoapUI NG pro.
What You Will Learn:
4 Important Features of SoapUI Pro
Feature #1: Point to Click (Drag & Drop):
This enables test steps in a certain test suite to be cloned easily. This will let you duplicate work without having to recreate it.
Here is how you can do it:
Make your project tree as below. We are going to add test request by dragging and dropping into another project.
- Double click on Testcase node present under test suite from GlobalWeather project tree
- Then drag the Request1 from DemoWebServices -> BarCodeSoap tree and drop into test case screen.
- Take a look at the following screenshot to get picture better idea.
(Click image for enlarged view)
- SoapUI Pro will ask us for confirmation. Choose Yes.
- We will see Add Request to Testcase dialogue where we need to enter new request name
- Let me enter “GenerateBarCodeRequest” in the request text field.
- Once it is done, click OK to save. Here’s the screenshot that shows newly added test case under the test suite.
Similarly, we can add test suite or other nodes from one project to another project just by dragging and dropping.
Feature #2: Data Driven Testing
SoapUI Pro uses the data source test step that will connect external data source and feed the data to the web service. Data source test step comes with data source loop that enables iterating the data and send it to the web service. This feature is useful for both functional-data driven and load testing.
The data sources supported are Excel, JDBC, XML and any other compatible databases. More than one data sources can be connected at one time.
Here is an example – A data source project will look as below:
Feature #3: Reporting
SoapUI Pro offers different types of reports for better and easier analysis. They are:
- Printable Report – It allows us to export as PDF, HTML, RTF, Excel and so on.
- Data Export – can we used to extract specific data as XML and CSV formats.
- HTML Reports –generates the result in an HTML format that can be published on any web page.
Now let us create sample report for the test suite execution. Follow these steps:
- Create a project with http://www.webservicex.net/globalweather.asmx?WSDL
- And then add test suite and test steps as shown in the following screenshot
- Once the test requests are configured properly, double-click on the test suite
- Click on the run button from the toolbar to start the execution
- SoapUI will start the execution and finally, shows the test suite execution status
- Now click on the Create Report icon from the test suite toolbar.
- It will ask you to select the report type that you wish to create
- Make the required changes and then click OK to generate a report. Now you can see the generated report.
Similarly, we can generate data export report. Let us click on the create report icon from the toolbar. SoapUI Pro will launch the Create Report dialogue window. In the dialogue, check all the datasets and change the format to CSV so we can verify the report data with Excel. Also, check Generate Header Row check box. Finally, specify the destination folder where the report has to be saved. Look at the following screenshot.
On OK, SoapUI Pro will generate three files (with the name as shown in the datasets section) in the mentioned location on your hard drive. If any errors occurred during execution, error log files also will be created in the same location.
JUnit Style HTML Reports:
JUnit Style HTML Report will generate the test results for each test suite and test cases. To create HTML report, click on the icon. In the Format drop-down, click JUnit-Style HTML report option. Next, click Single Page if it is not selected already. Then specify the destination folder path and click OK. The following HTML format report is obtained.
(Click image for enlarged view)
Feature #4: Coverage Feature in SoapUI Pro
Coverage feature is used to analyse the covered REST or SOAP services. This will be captured during functional testing, mock services testing and so on. Coverage status can be checked for a test suite as follows:
- Double click on the test suite name
- Execute the test suite by clicking on the run icon
- Once execution is completed, we can see the Coverage tab present next to the test cases tab. Please refer the following screenshot
(Click image for enlarged view)
Coverage feature focuses on functional tests, mock services and HTTP monitor scenarios. It also covers project level, test suite and test case levels as can be seen below:
SOAP and REST Services:
SOAP, created by Microsoft, follows certain standards. It is a protocol that uses XML to transfer the messages across the world through the Internet. Its important feature is the built-in error handling- in both request and response. Interestingly, we don’t need to use Web Services Description Language (WSDL-a file that is associated with SOAP). WSDL contains the definition of how the web services are working and how we can refer it.
As we all know SOAP-based services will be identified by its image indicator in the SoapUI project. See the below screenshot.
REST does not have complexities as it supports CSV, JSON and RSS format. So we can get the output data for REST services in the above-mentioned formats. Please see the screenshot below for REST services in SoapUI Pro.
There are some variances between SOAP and REST web services. Let us use what they are.
- Heavyweight standard that requires some procedure to access the web services.
- Platform, language and transport independent as it does not require HTTP
- Widespread acceptance
- Error handling integration.
- Seamless integration with many languages
- Faster than SOAP
- Efficient as it supports various formats like JSON, CSV, RSS
- Many open source plugins and tools are available to test REST services easily.
SoapUI Pro as the name indicates is really the Pro version where there are many additional features, which make it easier to use, faster, secure, more capable and versatile. Even though there are many other features that are more specific to pro audience, the ones listed above are the ones applicable to most generic users.
Next SoapUI Pro tutorial #13 – In the next tutorial we will learn more about Soap and REST services– more details are coming up.
Keep reading and please post your questions/comments below.