0

I just started working on TOSCA, I need one help with the technical issue which I am facing now.

I have an API which sends a array of objects and my test condition should validate a particular field in all objects in array.

In TOSCA when I scanned my API, I see an item attribute is created and that has all fields within it.As per the source I see that we can extract any data from the item either by making the item as "$index" or by setting the value as index==1(index value).

enter image description here

or like this

enter image description here

But I don't want to iterate like this as for each test data, the number of items may vary and I don't want to hard code the response by index.As it fails with a new data set as below

enter image description here

With one test data I got four records and in next iteration response has only three records and also data updated so the verification is failed.

Can someone help me to find out a solution to iterate / loop through all items at once(using some loops) and extract data into buffer.

Karthik P
  • 107
  • 2
  • 12

0 Answers0