Data Driven Testing -SoapUI Pro/Ready API Part 1 -Using Excel
In this blog, lets discuss about how to do Data Driven In Soap UI using Excel file and follow the steps Soap Ui to generate data and run the Test Case.
Ready API
ReadyAPI is an easy-to-use no-code API Testing platform designed to streamline your testing workflows. Automate and scale your end-to-end tests across multiple API types. Run compatible load tests against your functional tests. Enable virtualization to ensure fast and reliable integrations for your development teams.
Data driven testing
In this blog lets learns how to do Data Driven Testing
Run test case with multiple set of data and maintain the data in Excel , Notepad, JSON, XML,,. Use that data as an input for our Request
Different types of Data Source Types
Data Connection
Data Generator
Excel
File
JDBC
Grid
Groovy
JSON
XML
Directory

we can do Data driven using following Sources
Data Driven Testing Using Text File
Data Driven Testing Using Grid
Data Driven Testing Using Data Generator
Data Driven Testing Using JDBC(MySQL Database)

Data Driven testing using Excel
Send Request with multiple set of Data like Countries, for each country ,we will Verify ISO code is correct or not .
Excel Sheet
Countries | ISO Code |
Argentina | AR |
Australia | AU |
Belgium | BE |
Brazil | BR |
Colombia | CO |
Download SoapUI Pro
After downloading
In Ready API
Go to file , click New Empty Project

Give Project Name as FootballSoap

When you click Project FootballSoap , you will be asked to Create or Import API , select Import API

Give the WSDL URL
https://ws.footballpool.dataaccess.eu/info.wso?wsdl
select WSDL Definition ( SOAP)

Advanced option , select Create Sample requests for all operations and click Import API

API is downloaded

Right click InfoSoapBinding and click New Test Suite

Create New Test Suite
Select one Request for countries

Give name for Test Suite

Test Suite with Test Case and Request will be created as shown

Click the countries Request , you will see XML code for the request - ? is parameter to be passed

Write India as Parameter and click send or run icon , You will get Response with ISO Code for India


Now we are going to do Data Driven Testing , where we are going to give set of country name with ISO Code through Excel and verify the Corresponding ISO Code for each country
So Data Source here is Excel file

Once you add Data Source , you will find the structure on left side which will have
Test Suite
Test Case
Countries
Data Source
Click + to add Properties

Now we have to add properties , so click green + button to add properties
CountryName
ISO Code


You can see the properties has been added

Now we are going to add Excel file , select excel from Data Source dropdown

It will ask Do You want to import properties ? , click No , as we have added the properties manually

It will give as this setting to fill about the excel details
Give excel sheet path
Sheet Name : Sheet1
Give A2 , as from A2 we have the data , A1 has headings

Now Click the green run icon to download all data from Excel file
It will pop up with this message
5 means , 5 rows in excel ....

Enter 0 , 0 means all rows in excel

Once You click Ok , all the details from excel sheet will be downloaded into soap UI , you will be seeing below all the details are added

Now we have to repeat the request multiple times , so we are going to put Request in Loop , so add Data Source Loop

Select Data Source Loop

Give any name and Click OK

Once data source loop is added , you ca see the structure as below

You have to arrange by drag in this order
Data Source - data is taken from data source
Countries Request - request
Data source loop - run request in loop
To take countries name from data source , click Data source loop and select
Data Source Step : Data source
Target Step : Countries
Add Data Source Loop
Take data from source for the Countries Request

You will see this page , click the Input box or ... dots

Now we have to set the flow as below to get Country name from data source and click Add

Once u add , it will appear like this ${Data Source#Country Name}

Click XML , you can see the parameters has been changed

Now we have to verify the ISO Code from response
Go to response , right click on ISO Code and click Validate

It will move to Assertion Page
you will see the xpath of the ISO Code from XML in XPath Expression

You will be seeing IN in expected Result , we have to Verify result for all the countries mentioned in Data source Excel , so right click Select Content and follow the flow and select Property ISO Code

Once you have given the Data source for ISO Code , it will appear as below in Expected Result
Click Save

So we have to run the whole Test Case multiple times , so go to Countries Test Case left side and click , you will see the below image
Click Run Icon in green button

So now Data Driven for multiple data with single request is done

You can see Transaction Log , for each request , it will run Data source , Countries , Data source Loop

Conclusion:
I hope, This article will help you to understand How to do Data Driven Testing Using Excel in Soap UI Pro.
In Next , Part 2 Blog , lets see how to do data driven using Grid, Data Generator, Text File and JDBC . We will be learning how to do Data driven and save the result in excel automatically. https://www.numpyninja.com/post/part-2-data-driven-testing-soapui-pro-ready-api-data-sink-data-driven-and-save-result
You must have got an idea on the topics explained in this blog. Lets explore more and learn New Topics.
Happy Learning