Contributions
Re: ReadyAPI 3.3.1 - How to load list from excel datasource ?
Well, sorry for the explanation if it caused confusion, but there’s not much to talk about, basically the whole situation is like this: - SOAP Request: (xml from question) - Excel file with respective data to fill XML of request (table from question) the xml structure contains objects: [call_test_sell] -------------- Fields --------------[ItemsList] ----------------------------[StrSaleItem] ------------------------------------------ Fields ----------------------------[StrSaleItem] ------------------------------------------ Fields -------------- More Fields When i use the datasource resource from Excel File the properties extracted is like this: -------------- call_test_sell Fields -------------- StrSaleItem Fields -------------- call_test_sell More Fields So because everything is in one level by the excel table, the test step of the request ends up making 2 calls when in fact it is a call with a property that has 2 products inside the column. This make 2 Soap Requests 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 When in fact it should be like this : 1 Request with ItemList storekey saleid OpenDateTime Operation ItemsList APIDateTime 100 1 2020-07-30T10:30:00 BUY [ StrSaleItem(1,1010,1,3.5,false,2020-07-30T10:30:10), StrSaleItem(2,2311,1,9,false,2020-07-30T10:30:11) ] 2020-07-30T10:30:20 Test Case : What i need to do for the datasource to be able to fill the request with the parameters, do i need to change the file structure ? Any questions , let me know ,i hope it was clear.4 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.5KViews0likes0CommentsRe: ReadyAPI 3.3.1 - How to load list from excel datasource ?
Its entirely possible with the datasource functionality and groovy Ok You can load in the .wsdl, create your test steps via the request defined in the .wsdl and paramaterise your variables in a spreadsheet or csv or whatever. I tried to do it this way, but the SOAP Request does not add items within the product list, it understands how each call with one item instead of a call with 3 items!!4 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.5KViews0likes2CommentsReadyAPI 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?4 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.6KViews0likes4Comments