DannyDainton / newman-reporter-htmlextra

A HTML reporter for Postman's Command Line Runner, Newman. Includes Non Aggregated Runs broken down by Iterations, Skipped Tests, Console Logs and the handlebars helpers module for better custom templates.
Apache License 2.0
357 stars 139 forks source link

newman: could not find "htmlextra --reporter-htmlextra-title "ABC " --reporter-htmlextra-export ABC.html" reporter #385

Closed ShilpaSachdeva closed 2 years ago

ShilpaSachdeva commented 2 years ago

Is There An Existing Issue

What Are You Seeing

I am trying to run my collections in parallel using https://github.com/postmanlabs/newman/blob/develop/examples/parallel-collection-runs.js. In options, i give reporter as htmlextra reporters: ('htmlextra --reporter-htmlextra-title "ABC_Test " --reporter-htmlextra-export abc.html') In gitlab-ci.yml, i have

image: 
  name: dannydainton/htmlextra
  entrypoint: [""]

stages:
    - build
    - test

install_dependencies:
  stage: build
  script:
    - npm install

  artifacts:
    paths:
      - node_modules/

cache:
  paths:
    - node_modules/

api_testing:
  stage: test
  script: npm test (this runs parallel.js file)
  artifacts:
        paths:
          - abc.html

package.json looks like:

{
  "name": "parallelrun",
  "version": "1.0.0",
  "description": "",
  "main": "parallel.js",
  "scripts": {
    "test": "node parallel.js"
  },
  "dependencies": {
    "async": "3.2.3",
    "newman": "^5.3.2",
    "newman-reporter-htmlextra": "^1.22.8"
  }
}

Steps To Reproduce The Issue

Running locally or in pipeline gives same error newman: could not find "cli, htmlextra --reporter-htmlextra-title "ABC " --reporter-htmlextra-export abc.html" reporter ensure that the reporter is installed in the same directory as newman please install reporter using npm

Full Newman Command Or Node Script

Locally in terminal
npm init (will install dependency from package.json)
node parallel.js (will execute similar file https://github.com/postmanlabs/newman/blob/develop/examples/parallel-collection-runs.js
but with reports in option as mentioned above )

HTMLEXTRA Version

1.22.8

Newman Version

5.3.2

Additional Context

No response

DannyDainton commented 2 years ago

What's this doing?

reporters: ('htmlextra --reporter-htmlextra-title "ABC_Test " --reporter-htmlextra-export abc.html')

That property is for adding reporters, not the flags for the reporters.

reporters: ('htmlextra')

A basic example:

https://gitlab.com/DannyDainton/postman-ci-pipeline-example/-/blob/master/.gitlab-ci.yml

This isn't a bug with the reporter, it's an issue with your use of the YAML file. Closing this issue.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.