Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.



See 'Node.js Command Reference - Running tests using mocha' for full parameter details

Multiple Reporters Configuration

In case you’re already using a mocha reporter, like allure or mochawesome, it may conflict with the Sealights agent - which adds a reporter of its own (SeaLightsReporter) which passes the agent the test-events data.

A common solution is to configure the Multi-Reporters plugin:

  1. Install

  2. Create a file config.json:

    Code Block
        "reporterEnabled": "slnodejs/tsOutputs/mocha-reporter/index, mocha-allure-reporter",
        "SeaLightsReporterReporterOptions": {},
        "mochaAllureReporterOptions": {
            "targetDir": "allure-results"
        "mochaJunitReporterReporterOptions": {}
  3. When you run slnodejs mocha run it with the following additional parameters:

    Code Block
    slnodejs mocha --tokenfile /path/to/sltoken.txt --buildsessionidfile buildSessionId ... -- --reporter-options configFile=config.json