For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

The configuration described here supplements Step 1: Configuration found in the Steps for Instrumenting a Test Runner with SeaLights Go Agent

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: Add parameters as CLI flags

./slgoagent config \
  --token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
  --enableGodog 

Example 2: Using environment variables

export SL_TOKEN="./sltoken.txt"
export SL_ENABLE_GODOG=true

./slgoagent config

Example 2b: Using environment variable with CLI flag

export SL_TOKEN=***

./slgoagent config \
--enableGodog

Example 3: Using configuration file

Create .slconfig.yaml in your project root:

enableGodog: true

Then run:

./slgoagent config --token="./sltoken.txt"

Last updated

Was this helpful?