bo8ster
14 years agoOccasional Contributor
Get specific rows from an excel data source.
Hi all
Currently, the fields in the request have a one-one relation to fields within excel, thus one row per request from one worksheet, works great.
I now have the issue where I have a one to many relation within data across different worksheets.
An example might be to send organisation details like the name and a list of names within the organisation like:
“Organisation 1” has
“Bob”
“Job”
“Barry”
Where organisations and names are stored in different worksheets (like tables) say org and name.
Within the request I wish to iterate the data source like ${organisations#name[1]} and ${name#firstname[1]}, ${name#firstname[2]}, ${name#firstname[3]} so I can send all the data in one request.
The Data Source Loop is good but only allows one row at a time to be extracted; I need many rows extracted from different work sheets between requests - ${name#firstname} only gets the last read row.
Can this be done in Groovy? I tried context.expand( '${WageData#Pay}' ) but again I can’t choose the rows I wish.
If it cannot be done, any suggested work arounds?
I am using SoapUI Pro 3.0.1.
Thanks!
bo8ster
Currently, the fields in the request have a one-one relation to fields within excel, thus one row per request from one worksheet, works great.
I now have the issue where I have a one to many relation within data across different worksheets.
An example might be to send organisation details like the name and a list of names within the organisation like:
“Organisation 1” has
“Bob”
“Job”
“Barry”
Where organisations and names are stored in different worksheets (like tables) say org and name.
Within the request I wish to iterate the data source like ${organisations#name[1]} and ${name#firstname[1]}, ${name#firstname[2]}, ${name#firstname[3]} so I can send all the data in one request.
The Data Source Loop is good but only allows one row at a time to be extracted; I need many rows extracted from different work sheets between requests - ${name#firstname} only gets the last read row.
Can this be done in Groovy? I tried context.expand( '${WageData#Pay}' ) but again I can’t choose the rows I wish.
If it cannot be done, any suggested work arounds?
I am using SoapUI Pro 3.0.1.
Thanks!
bo8ster