Open jhulme opened 2 years ago
Using pre-request scripts in collections as well, raising the same error.
/home/user/project/node_modules/newman-reporter-json-summary/index.js:25
'Name': failure.parent.name,
^
TypeError: Cannot read property 'name' of undefined
at /builds/openxtrem/mediboard/node_modules/newman-reporter-json-summary/index.js:25:40
at Array.forEach (<anonymous>)
at createSummary (/builds/openxtrem/mediboard/node_modules/newman-reporter-json-summary/index.js:22:26)
at EventEmitter.<anonymous> (/builds/openxtrem/mediboard/node_modules/newman-reporter-json-summary/index.js:68:37)
at EventEmitter.emit (/builds/openxtrem/mediboard/node_modules/eventemitter3/index.js:203:33)
at done (/builds/openxtrem/mediboard/node_modules/newman/lib/run/index.js:314:29)
at /builds/openxtrem/mediboard/node_modules/postman-runtime/lib/backpack/index.js:58:34
at PostmanCollectionRun._process (/builds/openxtrem/mediboard/node_modules/postman-runtime/lib/runner/run.js:160:13)
at PostmanCollectionRun.<anonymous> (/builds/openxtrem/mediboard/node_modules/postman-runtime/lib/runner/run.js:166:76)
at listOnTimeout (internal/timers.js:557:17)
at processTimers (internal/timers.js:500:7)
I agree with @jhulme suggestion to discard those failures in the first place.
Reporter fails to handle failures that occur within pre-request scripts.
The following error message is returned.
Taking a closer look at the failure object returned, you can see that when a failure occurs within a pre-request script the
parent
is left undefined.Assuming that simply discounting these failures when building the summary object would be sufficient. Unless there is a particular need to include these failures within the final report summary?