newman: "TypeError: Cannot read property '0' of undefined" when test fail in jenkins
-
Newman Version (can be found via
newman -v): newman -v 3.4.2 -
OS details (type, version, and architecture): CentOS 6.8 and newman_alpine33 docker image
-
Are you using Newman as a library, or via the CLI? CLI
-
Did you encounter this recently, or has this bug always been there: when
-
Expected behaviour:
-
Command / script used to run Newman:
-
Sample collection, and auxilliary files (minus the sensitive details):
-
Screenshots (if applicable):
when newman in jenkins and if fail test, newman gets error in cell.js

but sucessful in CLI

About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 22 (4 by maintainers)
What worked for me was not using
-tin thedocker runcommand. My exact syntax was:@kunagpal what was the solution to close this issue?
any news here?
I’m running into this issue running the newman docker container in a Jenkins pipeline, I’ve found that adding the
--reporter-cli-no-failuresflag to my command gets me past the failure until this is fixed.I was also experiencing this issue. My hypothesis is that this occurs because newman explicitly calls
cli-table2withcolWidths = undefined. You can see this exact behavior for example with a free-style jenkins pipeline project with this definition:This will provide output like this:
I think the error is inside the
parseFailuresfunction inindex.jswhen settingcolWidths. Here’s the relevant snippet:In cases where the
ifstatement is false thecolWidthswill end up with the invalid value ofundefined.The fix at first sight seems to be simply to initialize the
vardirectly with[].