Godog
Using the Go Agent with Godog
The Go Agent provides special support for the Ginkgo BDD test framework. When enabled, the agent automatically integrates with Ginkgo's test lifecycle to track test execution.
Configuration
To use the Go Agent with Ginkgo tests, simply add the --enable-godog parameter when following the Steps for Instrumenting a Test Runner with SeaLights Go Agent (Default Usage - Go Test)
Example Configuration
Like most other parameters, you can add the Godog parameter in three different ways: CLI flags, environment variables, or configuration file. The examples below demonstrate each approach, using the minimum recommended parameters for a Ginkgo Test Runner. For additional configuration options, see the Go Agent Parameter Reference Table.
Example 1: All parameters as CLI flags
./slgoagent config \
--token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
--tests-runner \
--test-stage="component" \
--enable-godog \
--lab-id="shoppingcart.dev.qa-blue"Example 2: Using environment variables
export SEALIGHTS_TOKEN="./sltoken.txt"
export SEALIGHTS_TESTS_RUNNER="true"
export SEALIGHTS_TEST_STAGE="component"
export SEALIGHTS_ENABLE_GODOG=true
export SEALIGHTS_LAB_ID="shoppingcart.dev.qa-blue"
./slgoagent configExample 2b: Using environment variables with CLI flags
export SEALIGHTS_ENABLE_GODOG=true
./slgoagent config \
--token="your-token" \
--tests-runner \
--test-stage="component" \
--lab-id="your-lab-id"Example 3: Using configuration file
Create .slconfig.yaml in your project root:
testsRunner: true
enableGodog: true
testStage: "component"
labId: "shoppingcart.dev.qa-blue"Then run:
./slgoagent config --token="./sltoken.txt"Last updated
Was this helpful?

