Versions Compared

Key

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

To capture code coverage on your backend server, you need to run it using our Node.js test listener agent.

Code Block
Unix:
./node_modules/.bin/npx slnodejs run --tokenfile ./path/to/sltoken.txt --buildsessionidfile buildSessionId [--labid <Lab ID>] --workspacepath "." --useinitialcolor true -- /your/backend/server/command 

Windows:
call .\node_modules\.bin\slnodejs run --tokenfile \path\to\sltoken.txt --buildsessionidfile buildSessionId [--labid <Lab ID>] --workspacepath "." --useinitialcolor true -- \your\backend\server\command 

Note the /your/backend/server/command from above refers to "./server/app.js" in the example of command below:

./node_modules/.bin/npx slnodejs run --tokenfile ./sltoken.txt --buildsessionidfile buildSessionId --labid "LAB_ID_2" --workspacepath "./server" --useinitialcolor true --useslnode2 -- "./server/app.js"

...