Forum Discussion
It's difficult to elaborate more based on what you have given.
As you say, the JSON is complex, even for a single donut. What isn't clear is how many donuts per payload? How much variation of batter and how much variation of toppings? How many items in batter? 1..n? 1..3 max?
One thing I can say is that when using datasources, you don't have to restrict a cell in the datasource to be a single, discreet value. e.g. {$datasource$ingredient} gives chocolate. You could instead have a cell that contains the JSON for a whole topping record. E.g. {$datasource$topping} returns '
{ "id": "5001", "type": "None" }
or even...
{$datasource$topping} returns
{ "id": "5001", "type": "None" },{ "id": "5002", "type": "Glazed" },{ "id": "5003", "type": "Chocolate" },{ "id": "5004", "type": "Maple" }
With separate datasources of donuts, batters and toppings, with the latter two nested inside donuts, you potentially could test lots of variations with a relatively small numbers of rows in each.
- saravanan3842 years agoNew Contributor
Thanks for the detailed reply ChrisAdams .
To answer your questions, The No of donuts, No of batter and No of toppings may vary test case by test case. For example my test case 1 may have 3 nos of donuts, my test case 2 may have 2 nos of donuts. Same thing applicable for batter and toppings too. That's why it is making too complex for me to handle the datasource.
Can you please show me some example excel sheet to accommodate this complex JSON?
Also help me by showing some sample datasource Steps and usage of datasource in ReadyAPI for this Complex JSON?
Appreciate your effort on this!!
Related Content
- 6 years ago
- 4 years ago
Recent Discussions
- 16 days ago