Newman-reporter-htmlextra warning -failed -alowed to faild

When I run newman run report locally it’s always generate a report but the same collection when I run it on pipline on Gitlab I see:

Warning -failed --allowed to field

and no files generated !!!

and this is my pipline code:

api testing:
  image: node:18
  stage: api testing
  script:
    - npm install -g newman
    - npm install -g newman-reporter-htmlextra
    - newman run ${POSTMAN_COLLECTION} --reporters cli,htmlextra,junit --reporter-htmlextra-export newman/report.html
  artifacts:
    paths:
      - report.html
  when: manual
  only:
    - master

I’m not sure that you would need the newman/ part here. Just report.html should work.

1 Like

This was not the problem I created a new collection containing one request and the result of the request test is always success and I tested it on pipline the report was generated successfully, but why when there are failed tests within the collection refuses to generate a file?!
Is there something I should add?

What type of failure was it? Do you see the failed run in the CLI output?

Not sure but it sounds more like how the pipeline handles the fails - Might need to look more at the workflow syntax to see if there is something that always creates the artifacts.

This might help:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.