Response data is not captured on the Newman report

I have seen the response from below post and tried to follow the instructions, but looks like the solution proposed in this post is pretty old and huge changes have been done to the htmlreporter since then.
Earlier solution from Feb 2018

I have added this new line -

But I am getting only title in the report there is no data -
Had to remove image due to new user limitation to add 3 images only :frowning:

Also, the response data fields are empty on the report -
Had to remove image due to new user limitation to add 3 images only :frowning:

Due this, even though there is a response received in the tests runs in postman, the report is failing to recognize it and test cases are shown as failed.

I also tried to add {{#with response}} block for the Response header and body section. But in this cases its failing with below error -
Change -

Error on execution -

Here are the 2 missing images which I couldnt add in the post itself -

image

Hey @vmdcteam

Which versions of Newman and the Reporter are you using?

Are you using a custom template?

What’s the command that you’re running?

Unfortunately, the images and the text don’t really offer much insight into what’s going on there. The error message you’re seeing would be related to something else, more than likely the values of something you’re passing in the command line.

Before getting that info together, could you do a full uninstall and a reinstall of Newman and the reporter please.

npm uninstall -g newman newman-reporter-htmlextra

npm install -g newman newman-reporter-htmlextra

Hi Danny,

I am using this version - ## [1.17.4] - 2020-07-22

Using this CLI to run the collection, $ is masked -
newman run Postman Collections: Organize API Development and Testing<$$$$> -e “C:<$$$$$>.postman_environment.json” -r htmlextra --reporter-htmlextra-title “$$$$$$”

The text image is the change I did on the dashboard-template.hbs file referring to the solution proposed in earlier post (link in my original post)
“C:\Users\vmdct\AppData\Roaming\npm\node_modules\newman-reporter-htmlextra\lib\dashboard-template.hbs”

Sorry, adding these lines just to be more clear with the ask -
When I run the postman collection manually, I get all tests passed. But when I run the collection from CLI with the newman & reporter (using command above), I could see the report doesn’t contain any response data, its empty… I think that is the issue why all tests are shown failed in the report. This is what I am trying to fix by updating the template referring to the old post… that’s the 1st solution I tried (1st text screenshot)… but it didn’t work…
So, additionally I made change to add {{#with response}} block on the same file. Still it didn’t work.

Hope I am clear enough… give me a shout if need any more info…

Thanks in advance…
Regards,
Abdul.

Did you reinstall Newman and the reporter?

There shouldn’t be any need for you to amend the template to see the data. That thread started long before I created the reporter and is very old so I would be caution making changes if you don’t fully understand what the Newman summary object is and how that’s handled by the handlebar syntax :grin:

If Newman is not sending the data, it wouldn’t reach the report.

I saw that you’re using the shared link in the run command - If you have been making changes to the collection and saving them in the app - These wouldn’t take effect until you update that shared link. The oringinal link is just a snapshot in time rather than a constantly updated collection.

1 Like

Getting below error while re-installing reporter -

C:\Users\vmdct>npm install -g newman-reporter-htmlextra
npm WARN deprecated [email protected]: Removed event-stream from gulp-header
npm WARN deprecated [email protected]: GitHub - lydell/resolve-url: [DEPRECATED] Like Node.js’ `path.resolve`/`url.resolve` for the browser.
npm WARN deprecated [email protected]: Please see GitHub - lydell/urix: [DEPRECATED] Makes Windows-style paths more unix and URI friendly.
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@snyk%2Fdep-graph - Not found
npm ERR! 404
npm ERR! 404 ‘@snyk/[email protected]’ is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of ‘snyk’
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

Has the reporter still installed?

That’s and warning and that second ‘error’ is a 404 to an npm repo - that shouldn’t impact the actual reporter installation.

Not getting the same error/404:

Tried again, no its not installed. Still same error.

Let’s start again because I have no idea what the set up of your machine currently is to know what’s going on. The reporter is downloaded about ~7k times a day and no one has reported an installation issue and given your example, they would have seen this straightaway :smiley:

Can you do this:

npm uninstall -g newman newman-reporter-htmlextra

Followed by this:

npm install -g newman newman-reporter-htmlextra

Ensure that you use these commands as it looked like you are doing just a single reporter install. You would need to do both Newman and the reporter.

An alternative install method would be to use Docker:

docker run -t -v $(pwd):/etc/newman dannydainton/htmlextra run collection.json -r htmlextra

Sorry, still the same. Not sure why… may be I will give a re-try after re-starting my PC…
FYI - Newman is installed and running on its own okay…

Noticed, its different file not found every time I install :slight_smile:

That looks like something else was 404’ing on npm registry.

What version of node and npm are you using?

This could explain it

Thanks :slight_smile: :man_facepalming:

NPM posted a new status to say that it’s back up, worth giving the install another good :crossed_fingers:

Installed now. Will re-try the collection now

Cool! :trophy:

Ensure that you have the most update copy of the collection if you’re using the public link - You can either update it or recreate the link.

Thanks for your help Danny.
I think the issue here with Postman only.

When I ran collection on Newman (without reporter) I got below -


The first line - unable to verify the first certificate is some error in Postman console as well.
Not sure why is this coming, since all certs are valid and tests are working just fine…
image

Great if you could help on this issue, or will raise a new post on portal…
Thanks again :slight_smile:

It says that it couldn’t be verified rather than not be valid due to the date etc.

For Newman, you could use the -k flag

In the APP, for it to send the request, you would have manually disabled the SSL certificate verification setting for it to complete the request and give you the response/tests

Screenshot 2020-08-06 at 13.14.20

With that enabled, you would have been presented with this screen:

Once disabled, it would have sent the request but given you the certificate warning:

This is the underlying error for that warning

But do you think, this is stopping Newman from getting response data?

Not sure - This is just a tiny cropped and masked part of your whole scenario, that’s coming from the App and not Newman so I honestly couldn’t give you an answer either way :smiley:

Have you ever added the certs locations to the newman run command?