Newman library revisited

I’m trying to run a simple collection of one request that requires no auth.
My request is:
https://api.github.com/
I can run this in runner or in a freaking browser, but I can’t get this to run with newman.

const newman = require('newman');

newman.run({
    collection: require('.\\Github.postman_collection.json'),
    reporters: 'html',
    reporter: {
        html: {
            export: '.\\htmlResults.html',
        }
    }
}, function (err) {
	if (err) { throw err; }
    console.log('collection run complete!');
});

The error that I get with the report is so informative…
There was an error sending this request

Wow! Really! :slight_smile:

Is it node causing the issue? Is it a permissions thing?

I’m running everything from a folder on the Desktop. Is that causing the problem?

Any thoughts?

Aside from some help getting this painfully simple request to run with the newman library. Is there some kind of verbose error reporting mode that provides a little more info as to what’s happening?

Is there a way to run these in a debugger?

Thanks,
Rob

Hey @robmcec

Is the file path correct? Does it work with the full path rather than the relative one?

How are you running the script? Can you share an image of the console that you are running this from?

There not a great deal of information to go off here, the script lots fine (apart from the file path maybe) but it’s lacking all the contextual environment details which would make running that script on my machine, different to yours.


I maybe have read this wrong… Is it actually producing a report?

Not sure if it will help but this reporter might give you more information about the request in the Collection:

It’s working now and I’m not sure what I did.

Yes, it’s producing a report.

Cool, I’m completely bias but I would take a look at the htmlextra reporter and see if that’s going to give you more information from the Collection run. :grin:

Oh yeah, that’s much better. Thank you!

1 Like