Skip to content

Add e2e-cli for E2E testing#203

Merged
MichaelGHSeg merged 4 commits into
v3.0from
add-e2e-cli
May 11, 2026
Merged

Add e2e-cli for E2E testing#203
MichaelGHSeg merged 4 commits into
v3.0from
add-e2e-cli

Conversation

@MichaelGHSeg

Copy link
Copy Markdown
Contributor

Summary

  • Adds e2e-cli/ — a Go CLI that reads a JSON event sequence via --input, sends events through analytics.NewWithConfig, and outputs {"success": true/false, "sentBatches": N} to stdout
  • Supports all six event types: track, identify, page, screen, alias, group
  • Lives as a sub-module (github.com/segmentio/analytics-go/v3/e2e-cli) with a replace directive pointing to the parent, so it always tests the local SDK
  • Adds .github/workflows/e2e-tests.yml and publish-e2e-cli.yml
  • Restricts e2e-config.json to basic test suite

Test plan

  • cd e2e-cli && go build -o e2e-cli-bin ./... && ./e2e-cli-bin --input '{"writeKey":"...","apiHost":"...","sequences":[...]}' exits 0 and prints JSON
  • Basic E2E suite passes: cd sdk-e2e-tests && CLI_COMMAND=".../e2e-cli-bin" E2E_TEST_SUITES=basic npx vitest run
  • e2e-tests.yml workflow runs clean on CI

@MichaelGHSeg

Copy link
Copy Markdown
Contributor Author

Also added .github/workflows/ci.yml to replace the old CircleCI config — tests Go 1.21, 1.22, and 1.23 in a matrix.

@MichaelGHSeg MichaelGHSeg merged commit a51c5e4 into v3.0 May 11, 2026
13 checks passed
@MichaelGHSeg MichaelGHSeg deleted the add-e2e-cli branch May 11, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants