Forum Discussion
richie
5 years agoCommunity Hero
Hey erarunmishra9
According to the help you dont need to rely on groovy for this.
Is this for a REST step or SOAP request?
As long as this is REST, according to the help you can use the 'Dump file' atteibute within your request attributes to save a requests response including any associated file attachments.
Cheers,
Rich
According to the help you dont need to rely on groovy for this.
Is this for a REST step or SOAP request?
As long as this is REST, according to the help you can use the 'Dump file' atteibute within your request attributes to save a requests response including any associated file attachments.
Cheers,
Rich
- erarunmishra95 years agoNew Contributor
hi Richie,
this is a REST response and i have to this in groovy.
- erarunmishra95 years agoNew Contributor
is it feasible in groovy to save REST API image response in .jpg/.png file?
if yes please suggest additional classes also.
- richie5 years agoCommunity HeroHey erarunmishra9,
The Dump File attribute saves REST response files, not SOAP so you could use this.
This raises the question, why bother with groovy when the native functionality does it for you? (the DumpFile property works for REST requests)
Theres just no added value. The expert groovy coders on the forum (which im not one of them) typically only extend their tests using groovy when the functionality doesnt do what is needed.
For example. You can build up an actual REST request along with the various header, uri/template and query parameters by using groovy alone, but theres no point when you have a REST test step that does it for you.
Can you clarify why you cant use the native functionality? (The Dump File property).
Could you please provide the RAW tab details (headers and payload) of your response?
Ta
Rich
- Feitz675 years agoNew Member
Related Content
- 2 years ago
Recent Discussions
- 16 days ago