Hi, I need to get the number of requests a collection has from newman using node.js.
I was trying to query 'args' (based on a previous helpful forum answer) but I can't get it...
I had also thought about using the postman api from postman to count the response json requests, but I think I would have a problem passing that variable to node.js.
@PauSanch do you really need to do it using newman? What if you loaded the collection before running Newman using postman-collection package? That package has some neat functions.
Hi, I need to get the number of requests a collection has from newman using node.js. I was trying to query 'args' (based on a previous helpful forum answer) but I can't get it...
const newman = require('newman'); newman.run({ collection: ("./PostmanCollections/CollectionName.json"), environment: ("./postmanVariables/A1Env.postman_environment.json"), reporters: "cli", }).on('beforeIteration', (err, args) => { console.log(
Count request collecction: ${args. ?¿}
) })I had also thought about using the postman api from postman to count the response json requests, but I think I would have a problem passing that variable to node.js.
Thank you in advance!