Datasource Loop with Script
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2020
02:29 AM
01-31-2020
02:29 AM
Datasource Loop with Script
Hi, i am new in this field. But i have made some test with Ready API and these works fine.
I have a simple question:
I have in my Test 4 Parts.
1. Datasource
2. Datasource Loop
3. A Soap Request with Data
4. a Groovy Script to writes the Response Files
How i can put in the Loop my Groovy Script ? These Loops run only with the DatasourceLoopReport and the GetDocument.
Thanks,
Stefan
3 REPLIES 3
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2020
03:07 AM
01-31-2020
03:07 AM
Hey @stefankranz,
The DatasourceLoop step is typically the last step in the sequence.... i may be misunderstanding the purpose of your test but if you alter the sequence of steps as follows, wouldnt this solve thr problem?
Datasource
GET (SOAP) base64.encoded
Groovy (base64.decode)
DatasourceLoop
Wouldnt the above satisfy and include the decode in the loop or am i missing something?
Cheers,
Rich
The DatasourceLoop step is typically the last step in the sequence.... i may be misunderstanding the purpose of your test but if you alter the sequence of steps as follows, wouldnt this solve thr problem?
Datasource
GET (SOAP) base64.encoded
Groovy (base64.decode)
DatasourceLoop
Wouldnt the above satisfy and include the decode in the loop or am i missing something?
Cheers,
Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2020
03:42 AM
01-31-2020
03:42 AM
There are couple of options, have response writing logic in one of the below:
- Use events feature AfterStep, but save conditionally (i.e.,only if the step name is specific so that it won't write for unwanted steps).
- the script assertion (i understand it is a bit wierd, but it can do the job)
And you wont need the additional groovy script test step.
Regards,
Rao.
- Use events feature AfterStep, but save conditionally (i.e.,only if the step name is specific so that it won't write for unwanted steps).
- the script assertion (i understand it is a bit wierd, but it can do the job)
And you wont need the additional groovy script test step.
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2020
12:39 AM
02-04-2020
12:39 AM
Thank you so much nmrao and richie!
@stefankranz , did you have a chance to try out the approaches the Community suggests? Please share your progress with us.
Sonya Mihaljova
Community and Education Specialist
