How to pass array of inputs where array limit is Dynamic and unknown while setting up
Hi Team,
Here i encountered a situation where i need to send the data in an array of elements, where i don't know the size of the element.
{
"cars":{
"Nissan":[
{
"model":"Sentra",
"doors":4
},
{
"model":"Maxima",
"doors":4
}
],
"Ford":[
{
"model":"Taurus",
"doors":4
},
{
"model":"Escort",
"doors":4
}
]
}
}
Also would like to know how it can parameterized?
Nissan can be considered as one array, and ford.
Would be better if we have any options to generate it.
Thank
Udaya
Comments
-
Is the goal to pass the array or the content of the array?
If you wish to extract all models from Nissan array, you would right-click the model element in a JSON databank and select "Add Xpath for all Occurrences..". This option would extract all models of Nissan Array. You would do the same for the Ford array.
If you wish to extract the entire array, you would extract Nissan instead.
0 -
I would like to add array like Nissan and Ford. Let say i want add Honda and Toyota Additionally. I will be having the data in a sheet or in XMLDataBank
CAR|MODEL|DOORS -- All these inputs will be response from previous test results.0 -
You can also use Excel. Docs have detail. See "Parasoft SOAtest User's Guide > Functional/Integration Testing > End-to-End Test Scenarios > Performing Functional Tests Using Data Sources > Parameterizing Arrays of Varying Size"
0