Skip to content
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

Report generation fails if description is null #1

Open
reftel opened this issue Jun 11, 2018 · 2 comments
Open

Report generation fails if description is null #1

reftel opened this issue Jun 11, 2018 · 2 comments

Comments

@reftel
Copy link

reftel commented Jun 11, 2018

We have a collection with requests that lack description. The collection file has null values for the description field for these requests. When generating the report for a collection with such requests, newman-reporter-json-light fails with the following stack trace:

/home/magnus/node_modules/newman-reporter-json-light/lib/index.js:42
              'content': folderItem.request.description.content
                                                       ^

TypeError: Cannot read property 'content' of undefined
    at /home/magnus/node_modules/newman-reporter-json-light/lib/index.js:42:56
    at Array.forEach (native)
    at /home/magnus/node_modules/newman-reporter-json-light/lib/index.js:37:38
    at Array.forEach (native)
    at createLightSummary (/home/magnus/node_modules/newman-reporter-json-light/lib/index.js:35:38)
    at EventEmitter.<anonymous> (/home/magnus/node_modules/newman-reporter-json-light/lib/index.js:79:37)
    at EventEmitter.emit (/home/magnus/opt/newman-3.3.0/lib/node_modules/newman/node_modules/eventemitter3/index.js:151:33)
    at done (/home/magnus/opt/newman-3.3.0/lib/node_modules/newman/lib/run/index.js:199:29)
    at /home/magnus/opt/newman-3.3.0/lib/node_modules/newman/node_modules/postman-runtime/lib/backpack/index.js:56:34
    at PostmanCollectionRun._process (/home/magnus/opt/newman-3.3.0/lib/node_modules/newman/node_modules/postman-runtime/lib/runner/run.js:109:20)
@ookiisan
Copy link

ookiisan commented Nov 6, 2018

I'm in trouble with this behavior too:

    at /usr/local/lib/node_modules/newman-reporter-json-light/lib/index.js:37:30
    at Array.forEach (<anonymous>)
    at createLightSummary (/usr/local/lib/node_modules/newman-reporter-json-light/lib/index.js:35:38)
    at EventEmitter.<anonymous> (/usr/local/lib/node_modules/newman-reporter-json-light/lib/index.js:79:37)
    at EventEmitter.emit (/usr/local/lib/node_modules/newman/node_modules/eventemitter3/index.js:203:33)
    at done (/usr/local/lib/node_modules/newman/lib/run/index.js:277:29)
    at /usr/local/lib/node_modules/newman/node_modules/postman-runtime/lib/backpack/index.js:56:34
    at PostmanCollectionRun._process (/usr/local/lib/node_modules/newman/node_modules/postman-runtime/lib/runner/run.js:161:13)
    at PostmanCollectionRun.<anonymous> (/usr/local/lib/node_modules/newman/node_modules/postman-runtime/lib/runner/run.js:166:76)
    at ontimeout (timers.js:475:11)
    at tryOnTimeout (timers.js:310:5)
    at Timer.listOnTimeout (timers.js:270:5)```

@safarviktor
Copy link

Same issue, different object

C:\Users\xxxxxxxxxxxxx\AppData\Roaming\npm\node_modules\newman-reporter-json-light\lib\index.js:22
                    'content': failureReport.parent.description.content
                                                                ^

TypeError: Cannot read property 'content' of undefined
    at C:\Users\no-viksafa-01\AppData\Roaming\npm\node_modules\newman-reporter-json-light\lib\index.js:22:65

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants