Joao
5 years agoNew Contributor
ReadyAPI 3.3.1 - How to load list from excel datasource ?
I'm trying to make a file for testing using excel, but how to make the data be arranged in this way and be able to import it into a datasource and use the dataloop?
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:out="http://www.test.com">
<soapenv:Header/>
<soapenv:Body>
<out:call_test_sell>
<out:StoreKey>100</out:StoreKey>
<out:SaleID>1</out:SaleID>
<out:OpenDateTime>2020-07-30T10:30:00</out:OpenDateTime>
<out:Operation>BUY</out:Operation>
<out:ItemsList>
<!--Zero or more repetitions:-->
<out:StrSaleItem>
<out:ItemID>1</out:ItemID>
<out:ProductID>1010</out:ProductID>
<out:Quantity>1</out:Quantity>
<out:TotalGrossPrice>3.5</out:TotalGrossPrice>
<out:Cancelation>false</out:Cancelation>
<out:DateTime>2020-07-30T10:30:10</out:DateTime>
</out:StrSaleItem>
<out:StrSaleItem>
<out:ItemID>2</out:ItemID>
<out:ProductID>2311</out:ProductID>
<out:Quantity>1</out:Quantity>
<out:TotalGrossPrice>9</out:TotalGrossPrice>
<out:Cancelation>false</out:Cancelation>
<out:DateTime>2020-07-30T10:30:11</out:DateTime>
</out:StrSaleItem>
</out:ItemsList>
<out:APIDateTime>2020-07-30T10:30:20</out:APIDateTime>
</out:call_test_sell>
</soapenv:Body>
</soapenv:Envelope>
I tried to arrange the table in repetition of the data of the main object and only change the product object, but the request was not sent iterating the items, but following one by one without grouping.
Ex:
storekey | saleid | OpenDateTime | Operation | ItemID | ProductID | Quantity | TotalGrossPrice | Cancelation | DateTime | APIDateTime |
100 | 1 | 2020-07-30T10:30:00 | BUY | 1 | 1010 | 1 | 3.5 | false | 2020-07-30T10:30:10 | 2020-07-30T10:30:20 |
100 | 1 | 2020-07-30T10:30:00 | BUY | 2 | 2311 | 1 | 9 | false | 2020-07-30T10:30:11 | 2020-07-30T10:30:20 |
Is it possible to make this association with excel or just with groovy?
if so, what would be the expected file layout?