/
Using Go Agent - Running your Tests
Using Go Agent - Running your Tests
Unit Tests
Your Unit Tests executed via the go test
will automatically be reported after instrumenting your Go application project with the scan
command.
The default test stage name will be Unit Tests
but can be changed to anything matching your requirements via the environment variable SEALIGHTS_TEST_STAGE
updated just before executing the tests.
Functional Tests Using Ginkgo
To capture coverage, report the test results, and benefit from Sealights Test Optimization for your Functional Tests you can run the scan
command on the Ginkgo project folder with the relevant flags --tests-runner --enable-ginkgo
as follow
SEALIGHTS_AGENT_TOKEN=$(cat ./sealights/sltoken.txt)
#SEALIGHTS_BUILD_SESSION_ID="123"
SEALIGHTS_LAB_ID="my_lab_id"
SEALIGHTS_TEST_STAGE="Functional Tests"
./sealights/slcli scan --tests-runner --enable-ginkgo --workspacepath "$(pwd)/Functional API Tests" --path-to-scanner ./sealights/slgoagent --scm none