Not sure about Jenkins but what I know of that error, is that I’ve seen it when I was creating the htmlextra reporter when I’d messed up something in the index.js file or when it’s not installed in the correct place (where Newman is).
I would suspect it’s the latter but like I said, I’m not too sure about Jenkins config / workspaces / where the script runs.
In my local computer(Win 10) html reporter works fine. But for “htmlextra” same issue is shown in my local computer. index.js is attached. can you suggest me any workaround?
Hi Danny, I’m triggering my collection on both postman and CLI. And in both the Execution report i.e. in Postman Collection Runner it shows as “PASS” with Status code 200 but in Newman Report( i.e. html and html extra) shows as Response Code: 401 - Unauthorized.
SO could you please help me why so status code is different
What command are you using to run Newman?
What versions of the Newman and the htmlextra reporter do you have?
Do you have any Auth details in an environment / global file?
Can you share any more details about the collection itself - The more information will help me to figure out what’s going on for you…I’m kinda blind at the moment
Are you able to post an image of the runner set up and the request details from the Postman Console.
It’s just really difficult to debug a problem that only you can see on your side I don’t know the requests you are making and the way you have everything set up in your Postman instance.
The information you posted is helpful in terms of versions but the commands are just running the Postman Echo collection so it’s not really telling me much more.
The 401 message is telling me that you are using some form of authentication in the app for your requests. How are you add this and is this contained in the exported collection file you’re trying to run or in an environment / global file?
Please find all details of my Project.
I have attached Collection Link, Collection Runner Screenshot, OAuth2.0 Authorization, Global and Environment variables.
I’m going to close off this topic because this has moved past what the original post was asking.
I’ll DM you, this is just an authorisation problem and something that you’re doing in the app that’s doesn’t have anything to do with a Newman reporter.