Forum Discussion

Dheepha's avatar
Dheepha
Contributor
12 years ago

Dynamic Test data execution using groovy in SOAPRequest

Hi,

My requirement is something like, I have a base xml and I need to run the same request against same endpoint with different set of test data dynamically.
To be more clear, I have a request xml like below:

<DepAcctId>
<AcctId>10</AcctId>
<AcctType></AcctType>
<BankInfo />
</DepAcctId>

I have to run the same request by changing the AcctId dynamically upon running the test suite. I can read the AccId values from excel where I can save the multiple AcctId's and read the value and update it in the <AcctId> tag and Save the request and run the request.

Eg: I want to run the same request with 11,12,13,14,15 AcctId's which I can specify in the Excel file.

I could see many forums of reading from excel file but nothing solved my requirement.

Any help would be appreciated. Kindly provide me the groovy script which solves my purpose.

3 Replies