Forum Discussion
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!!
I dont understand what you mean when you state "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!!"???
Whats a "product list"?
What does "it understands how each call with one item instead of a call with 3 items!!" mean? Are you saying the elements in your soapbody are only picking up one value rather than the required number or do you mean something else? You mention 3 items, but the table of record data you mention on your initial post seemed to have a lot more data items per row than 3....?????
This isnt a criticism, but try and remember im not sitting in front of your laptop, nor am i working on your project, so i wont understand if youre using application specific terminology.
If you can clarify your descriptions with some screenshots, thst will help a lot. Screenshots of each test step and the data in spreadsheet as well as screenshots of your soap test step csn only help clarify.
Nice one fella,
Rich
- Joao4 years agoNew Contributor
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 Requestsstorekey 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. - - SOAP Request: