girirokr
(girirokr)
July 3, 2020, 12:45pm
1
Hi All,
I need one solution to save all the json response to a file in my local machine when all the test assertion passed in the test-tab.
Pls suggest me a solution to save the Response files locally with the same request name with specific folder manual config method.
Hey @girirokr
Welcome to the Postman community!
This is similar to a question that has been asked before, is there anything here that can help?
Hey @hdabas ,
Welcome to the community!
Just jumping in here to see if I can help with getting the request name from the Newman run.
Newman has certain events that can be access with the .on() function - A full list can be found here:
A basic example of getting the name of the Request would be using something like this:
const newman = require('newman')
newman.run({
collection: '<Postman Echo Collection>',
}).on('request', (err, args) => {
console.log(args.item.name)
})
Hereββ¦
1 Like
girirokr
(girirokr)
July 3, 2020, 1:46pm
3
@hdabas @dannydainton
it is usefull when we use it in newman but i would like to knew any steps that i can add under test of each request to get the response saved in a folder (User preferred).
This is another method of saving them, from the awesome @singhsivcan
1 Like