Closed NathanPrado closed 7 years ago
@NathanPrado Thanks for reporting this, and for the awesome description as well! :smiley:. A fix has been added in #854, and will be available in the next Newman release.
@NathanPrado This issue has been fixed in Newman v3.4.1
, do go ahead and check it out!
This error manifests itself when using the HTML Reporter and an uncaught error is thrown in request test. Forgive me for not pulling and fixing myself as I have never contributed to a github project before!
Newman Version : 3.4.0
OS details: Windows 10 x64
Are you using Newman as a library, or via the CLI? CLI
Did you encounter this recently, or has this bug always been there: Recently
Expected behaviour: Test run finishes and display error in output/html
Command / script used to run Newman:
newman run HtmlReporterIssue.postman_collection.json --reporters html,cli --bail
Sample collection, and auxilliary files (minus the sensitive details): (see attachment) HtmlReporterIssue.postman_collection.zip
Screenshots (if applicable):
Steps to reproduce the problem: (This can be reproduced by running the supplied collection with the command above.
SETUP
Execution
Analysis The issue seems to be from line 113 in the \html\index.js file:
var aggregationMean = executionMeans[item.id]
WhereexecutionMeans
has an undefined entry for the second request in the collection, as it was never run...possibly due to the --bail flag added to the command. Perhaps a sanity null check of aggregationMean before continuing to retrieve data on this object before continuing might suffice.Workarounds
--Nathan