-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Decimal points not showing in the reports response body if they are all zeroes #280
Comments
From what I know about Matt's CSV reporter is that he's taking the stream response and converting that to a string before adding it to the final CSV file. That's not really what I'm doing here as I'm pretty printing the JSON response and I think that I need to get some time to take a look at this closer. |
Hi danny i looked into this , the issue is caused by JSON.parse(data) in prettyprint class. Should we be formatiing the response send by server ? |
I did have a look at the and tried a few things without that being there but there are a few other issues. That is more about decorating the reports request and response body in the correct way and could be handled differently but I don't have time to dig deeper into all the other things that could potentially break as a result of removing it 😔 |
When I run a Newman test with the option for an HTMLEXTRA report, I get the a html outputfile which shows the amount fields without zeroes behind the decimal point in the response body.
Running the same test in Newman with the option for CSV output I DO get the zeroes.
HTML output:
CSV output
You can see the difference between HTML and CSV output
Investigating the HTML file:
Google Chrome - Inspect - Sources
The zeroes are in the file, but the formatting is NOT ok
Version and Platform Information:
newman
version 5.0.0newman-reporter-htmlextra
version 1.19.4OS Windows 8, Version 6.3 (build 9600)
The CLI command you've used to start Newman
Newman run with HTMLEXTRA output:
newman run -k "Claims-test.json" -d "Claims-data.csv" -e %env%.postman_environment.json -r htmlextra --reporter-htmlextra-logs --reporter-htmlextra-omitHeaders --reporter-htmlextra-hideRequestBody "PostApiGebruikersV1Login" --reporter-htmlextra-hideResponseBody "PostApiGebruikersV1Login"
Newman run with CSV output:
newman run -k "Claims-test.json" -d "Claims-data.csv" -e %env%.postman_environment.json -r csv --reporter-csv-includeBody
Additional Context
Running the test in the Postman Collection Runner also shows me the zeroes.
The text was updated successfully, but these errors were encountered: