codeceptjs / CodeceptJS

Supercharged End 2 End Testing Framework for NodeJS
http://codecept.io
MIT License
4.11k stars 723 forks source link

Using mocha-junit-reporter with run-workers #2861

Closed karoletrych closed 3 years ago

karoletrych commented 3 years ago

What are you trying to achieve?

Running tests using multiple workers codeceptjs run-workers 5 and using mocha-junit-reporter .

  mocha: {
    "reporterOptions": {
        "mochaFile": "output/result.xml"
    }
  }

What do you get instead?

Result file is overwritten by last test which was executed.

I tried adding [hash] as stated in mocha-junit-reporter Readme:

mocha: {
    "reporterOptions": {
        "mochaFile": "output/result.[hash].xml"
    }
  },

But when i do that output xml isn't generated at all.

Details

karoletrych commented 3 years ago

Nevermind, forgotten about --reporter mocha-junit-reporter when testing the [hash] version 😅

ngraf commented 5 months ago

Thanks for the indirect tip with "[hash]". That is what I was looking for!