Skip to content

cypress-multi-reporters Unable to define filename via CLI #1178

@Xdomen

Description

@Xdomen

Expected behavior

Being able to save mochawesome and junit reports with same filename parameter.

Actual behavior

I am able to set mocha-junit-reporter XML report but unable to set filename for mochawesome HTML and JSON reports while working with mochawesome and mocha-junit-reporter

Ideally what I would like to do is save mochawesome and junit report with the same filename specified in the CLI command (not JSON file) since I need to pass them unique IDs for filenames.

Running the following command results in MOCHA_FILE=burek.xml --reporter-options reportFilename=awesomereport

[mochawesome] Report JSON saved to /mochawesome-report/mochawesome.json
[mochawesome] Report HTML saved to /mochawesome-report/mochawesome.html

burek.xml created
I tried with --reporterOptions but I get the same output. Am I doing something wrong? I'am utterly lost at this point so any help is greatly appreciated!

Information about the Issue
My mocharc.json file contents

{
  "reporter": "cypress-multi-reporters",
  "reporterEnabled": "mochawesome, mocha-junit-reporter",
  "mochaJunitReporterReporterOptions": {
    "mochaFile": "burek-custom.xml"
  },
  "mochawesomeReporterOptions": {
    "reportFilename": "burek"
  }
}

Packages:

├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions