Test Runner Mode (Test Framework)
Using the Go Agent in Test Runner Mode
Overview
Steps for Instrumenting a Test Runner with SeaLights Go Agent (Default Usage - Go Test)
1
Configuration
./slgoagent config \
--token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." export SEALIGHTS_TOKEN="./sltoken.txt"
./slgoagent config# Note: the Agent Token parameter cannot be added to the .slconfig.yaml
# add non-mandatory parameters in yaml format
# For example:
buildTags: "e2e"./slgoagent config --token="./sltoken.txt"3
Run the Instrumented Tests
# On the runtime environment
export SL_TESTS_RUNNER="true"
export SL_TEST_STAGE="integration"
export SL_LAB_ID="shoppingcart.dev.qa-blue"./slgoagent config \
--token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
--tests-runner \
--test-stage="integration" \
--lab-id="shoppingcart.dev.qa-blue"# Run your tests as normal
go test ./...
# or with specific tags
go test -tags=integration -v ./tests/
# or your specific test commandUsing Other Supported Frameworks
Troubleshooting
Last updated
Was this helpful?

