...
Gathering coverage and test information using the SeaLights Node.jsTest Listener is done in a few steps, we recommend to use the Lab ID for this. If your component does not yet support the Lab ID option, use the Build Session ID to connect between the test listener and the test runner:
Starting the Test
...
Stage
First the SeaLights server needs to be notified that a test stage is starting.
Code Block |
---|
|
Unix:
./node_modules/.bin/npx slnodejs start --tokenfile /path/to/sltoken.txt --labid "<Lab ID>" --teststage "Unit Tests"
Windows:
call .\node_modules\.bin\ npx slnodejs start --tokenfile \path\to\sltoken.txt --labid "<Lab ID>" --teststage "Unit Tests" |
Expand |
---|
title | Using Build Session ID |
---|
|
Code Block |
---|
| Unix:
./node_modules/.bin/
npx slnodejs start --tokenfile /path/to/sltoken.txt --buildsessionidfile buildSessionId --teststage "Unit Tests"
Windows:
call .\node_modules\.bin\npx slnodejs start --tokenfile \path\to\sltoken.txt --buildsessionidfile buildSessionId --teststage "Unit Tests" |
|
...
Code Block |
---|
|
Unix:
./node_modules/.bin/
npx slnodejs uploadReports --tokenfile /path/to/sltoken.txt --labid "<Lab ID>" --reportFile "/path/to/junit_report.xml"
Windows:
call .\node_modules\.bin\ npx slnodejs uploadReports --tokenfile \path\to\sltoken.txt --labid "<Lab ID>" --reportFile "\path\to\junit_report.xml" |
Expand |
---|
title | Using Build Session ID |
---|
|
Code Block |
---|
| Unix:
./node_modules/.bin/npx slnodejs uploadReports --tokenfile /path/to/sltoken.txt --buildsessionidfile buildSessionId --reportFile "/path/to/junit_report.xml"
Windows:
call .\node_modules\.bin\ npx slnodejs uploadReports --tokenfile \path\to\sltoken.txt --buildsessionidfile buildSessionId --reportFile "\path\to\junit_report.xml" |
|
...
Code Block |
---|
|
Unix:
./node_modules/.bin/
npx slnodejs end --tokenfile /path/to/sltoken.txt --labid "<Lab ID>"
Windows:
call .\node_modules\.bin\npx slnodejs end --tokenfile \path\to\sltoken.txt --labid "<Lab ID>" |
Expand |
---|
title | Using Build Session ID |
---|
|
Code Block |
---|
| Unix:
./node_modules/.bin/
npx slnodejs end --tokenfile /path/to/sltoken.txt --buildsessionidfile buildSessionId
Windows:
call .\node_modules\.bin\ npx slnodejs end --tokenfile \path\to\sltoken.txt --buildsessionidfile buildSessionId |
|
...