If your testing framework is mocha, SeaLights agent integrates directly with it and reports the test results to the server directly
See 'Generating an Agent token' for instructions on how to generate a token
Here is a sample of configuring use instead of the command 'mocha --recursive
test
'
Sample command
Unix: ./node_modules/.bin/slnodejs mocha --tokenfile /path/to/sltoken.txt --buildsessionidfile buildSessionId --teststage "Unit Tests" --useslnode2 -- --recursive test Windows: call .\node_modules\.bin\slnodejs mocha --tokenfile \path\to\sltoken.txt --buildsessionidfile buildSessionId --teststage "Unit Tests" --useslnode2 -- --recursive test
"--recursive test" are sample parameters passed to mocha and should be replaced by your own
Also as SeaLights runs as a mocha reporter, you should remove any parameters setting the reporter otherwise they will conflict
Also note the double dash delimits between the sealights options and parameters passed to mocha
See 'Node.js Command Reference - Running tests using mocha' for full parameter details