Forum Discussion

vpachpute1's avatar
vpachpute1
Frequent Contributor
7 years ago

Run same API step for multiple data sets

Hi

 

I have one requirement that

 

1. Run one purchase request for multiple packages one by one. 

2. Package ID's are kept seperate in .txt file. 

3. If there are 10 package ID's, then purchase API step should run for 10 times for each packageID

 

Note: Initialy I have done it using DataSource and dataSource loop in ReadyAPI 1.9

 

But On Jenkinns , I am using SOAP UI 5.3.0 version and it doesn't supports data source. So my TC fails. And I am new to Groovy. So can anyone please help me doing this in Groovy. 

 

My purchase request

<?xml version="1.0" encoding="UTF-8"?>
<request>
<purchase>
<msisdn>8928374323</msisdn>
<package-id>${DataSource#package-id}</package-id>   [Note: Needs to take packageID's from .txt file]
<rating-attributes />
</purchase>
</request>

3 Replies