-5

I am automating testing of Restful services using ReadyAPI.

A Test case has two GET request steps(say GETCARDS and GETCARDDETAILS).

GETCARDS returns an array of Cardnumbers (not fixed size). I need to use these card numbers in second request GETCARDDETAILS and run them one by one.

For this these i am planning to dynamically create variables/properties based on Cardnumbers arrarsize and store the values for each run. Later use these values in second step GETCARDDETAILS . Need help in creating and storing values received in the response dynamically.

Abhishek
  • 1
  • 1
  • Have you tried the documentation? https://support.smartbear.com/readyapi/docs/soapui/steps/data-source.html – SiKing Feb 11 '20 at 18:28
  • Yes, there is no mention about dynamically creating variables/properties based on the response. – Abhishek Feb 11 '20 at 18:45
  • Because "dynamically creating variables/properties" is not what you want. There is a mention of "Later use these values in second step". – SiKing Feb 11 '20 at 19:05
  • But i think i need it because I need to create variables depending on the array size of cardnumbers array present in first request. Later, i need to iterate for each cardnumbers array element and pass the cardnumber in second request. – Abhishek Feb 11 '20 at 19:09
  • 2
    It still sounds like the data-source step and loop will do what you want. If not, please read [ask] and provide [mcve]. – SiKing Feb 11 '20 at 19:29

1 Answers1

1

Not sure if this would help but you may try to come up with a Groovy Script step within your test case which dynamically create variables based on your desired scenario and transfer the property to your next test step based on the image explanation below from ReadyAPI.

ReadyAPI Property Expansion

Adrian
  • 21
  • 4
  • Perhaps try and replicate the info in that image as part of the answer? That way there will be no external dependency in the future and the answer will always be available. imgur may well clean up that image in the future. – Friedrich 'Fred' Clausen Feb 19 '20 at 04:50