...
In case you’re already using a mocha reporter, like allure-mocha
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.
...
Create a file
config.json
- with content similar to the one below (that allowssealights
,mocha-allure
, andJUnit
reporters together) for example:Code Block { "reporterEnabled": "slnodejs/tsOutputs/mocha-reporter/index, allure-mocha, mocha-allurejunit-reporter", "SeaLightsReporterReporterOptionsseaLightsReporterReporterOptions": {}, "mochaAllureReporterOptionsmochaJunitReporterReporterOptions": { "targetDirmochaFile": "allure-resultsresults/junit-custom.xml" }, "mochaJunitReporterReporterOptionsallureMochaReporterOptions": { "resultsDir": "results/allure" } }
When you run slnodejs mocha run it with the following additional parameters:
Code Block npx slnodejs mocha --tokenfile /path/to/sltoken.txt --buildsessionidfile buildSessionId ... -- --reporter-options configFile=config.json