I am trying to generate test report for my collections in postman using newman cli,htmlextra reporter. I am able to run my authentication request successfully and generate report. In Postman, I have passed the bearertoken to all my other requests for authorization.
Everything is working in postman. On trying to execute the collection, am facing 401 Unauthorized error in newman though I have passed the required environment and global variables.
The following is the command I have used in the command line
newman run “D:\xxx\API backup\Control Branch Master Latest.postman_collection.json” -e “D:\xxx\API backup\Azure.postman_environment.json” -g “D:\xxx\API backup\xxx.postman_globals.json” --reporters=cli,htmlextra --insecure
The below is the screenshot the error in cmdline
Also the bearer value is not getting passed when I check it in the html report due to which my requests are failing thereby causing failure in the tests
Though all the required details have been passed in newman commandline, unable to get the expected report which is working fine in postman. Can someone please suggest me how to resolve the authorization issue in newman and Is there any specific way to pass the bearertoken here?