Skip to content

Add e2e-cli for E2E testing#250

Merged
MichaelGHSeg merged 3 commits into
masterfrom
add-e2e-cli
May 11, 2026
Merged

Add e2e-cli for E2E testing#250
MichaelGHSeg merged 3 commits into
masterfrom
add-e2e-cli

Conversation

@MichaelGHSeg

Copy link
Copy Markdown
Contributor

Summary

  • Adds e2e-cli/ — a standalone PHP CLI that reads a JSON event sequence via --input, sends events through the real Segment\Client, and outputs {"success": true/false, "sentBatches": N} to stdout
  • Supports all six event types: track, identify, page, screen, alias, group
  • Introduces E2eLibCurl subclass to inject http:// protocol for the mock test server (the base LibCurl hardcodes https:// with no option to override)
  • Adds .github/workflows/e2e-tests.yml and publish-e2e-cli.yml
  • Restricts e2e-config.json to basic test suite

Test plan

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

@MichaelGHSeg MichaelGHSeg merged commit a910e17 into master May 11, 2026
42 of 43 checks passed
@MichaelGHSeg MichaelGHSeg deleted the add-e2e-cli branch May 11, 2026 15:31
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